     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

        // From Transform
        let transScaleX = (toFrame.size.height * fromFrameAspectRatio) / fromFrame.size.width
        let transScaleY = (toFrame.size.height) / fromFrame.size.height
        let fromTransPanY = (toFrameCenter.y - fromFrameCenter.y) / transScaleY
        let fromTransPanX = (toFrameCenter.x - fromFrameCenter.x) / transScaleX
        
        let fromTransScale = CGAffineTransform(scaleX: transScaleX, y: transScaleY)
        let fromTransPan = CGAffineTransform(translationX: fromTransPanX, y: fromTransPanY)
        let fromTransform = fromTransPan.concatenating(fromTransScale)
        
        // To Transform
        let toTransPanY = (fromFrameCenter.y - toFrameCenter.y) * (type == .inward ? transScaleY : 1)
        let toTransPanX = (fromFrameCenter.x - toFrameCenter.x) * (type == .inward ? transScaleX : 1)
    
        let toTransScale = CGAffineTransform(scaleX: 1 / transScaleX, y: 1 / transScaleY)
        let toTransPan = CGAffineTransform(translationX: toTransPanX, y: toTransPanY)
        let toTransform = toTransPan.concatenating(toTransScale)
        
        return (fromTransform, toTransform)
    }
    
}

            toVC = (toVC as! UITabBarController).selectedViewController!
        }
        
        containerView.backgroundColor = backgroundColor
        containerView.addSubview(toView)
        containerView.addSubview(fromView)
        
        toView.setNeedsLayout()
        toView.layoutIfNeeded()
        
