     var springDamping: CGFloat
     var type: JKHImageZoomType
     
-    init(type: JKHImageZoomType, backgroundColor: UIColor = UIColor.white, viewContentMode: UIViewContentMode = .scaleAspectFill, duration: TimeInterval = 0.5, springVelocity: CGFloat = 1.5, springDamping: CGFloat = 1.0) {
+    init(type: JKHImageZoomType, backgroundColor: UIColor = UIColor.white, viewContentMode: UIViewContentMode = .scaleAspectFill, duration: TimeInterval = 0.7, springVelocity: CGFloat = 1.5, springDamping: CGFloat = 1.0) {
         self.backgroundColor = backgroundColor
         self.viewContentMode = viewContentMode
         self.duration = duration


    }
    
    fileprivate func transformsForZoom(_ type: JKHImageZoomType, toFrame: CGRect, fromFrame: CGRect) -> (from: CGAffineTransform, to: CGAffineTransform) {
        let fromFrameAspectRatio = fromFrame.width / fromFrame.height
        let toFrameCenter = CGPoint(x: toFrame.midX, y: toFrame.midY)
        let fromFrameCenter = CGPoint(x: fromFrame.midX, y: fromFrame.midY)

        
        containerView.addSubview(fromImageViewCopy)
        
        let fromAnchorPoint = CGPoint(x: fromImageViewCopy.center.x/containerView.frame.size.width, y: fromImageViewCopy.center.y/containerView.frame.size.height)
        let toAnchorPoint = CGPoint(x: toImageViewFrame.midX/containerView.frame.size.width, y: toImageViewFrame.midY/containerView.frame.size.height)
        let transforms = transformsForZoom(withType: type, toFrame: toImageViewFrame, fromFrame: fromImageViewCopy.frame)
        
        setAnchorPoint(fromAnchorPoint, forView: fromView)
        setAnchorPoint(toAnchorPoint, forView: toView)
        
        toView.transform = transforms.to
        
        self.animate(withTransitionContext: transitionContext, animations: {
            fromImageViewCopy.frame = toImageViewFrame
            fromView.alpha = 0
            fromView.transform = transforms.from
            toView.transform = .identity
        }) { (completed) in
            toView.layer.position = toView.center
            fromView.alpha = 1
            fromView.transform = .identity
            fromImageViewCopy.removeFromSuperview()
            fromView.removeFromSuperview()
            
            if tabBar != nil { // Animate the tab bar after animation
                self.animate(withTransitionContext: transitionContext, animations: {
