             height: fromViewController.view.bounds.height
         )
         UIView.animate(
-            withDuration: 0.4,
+            withDuration: TimeInterval(transitionDuration),
             delay: 0,
             usingSpringWithDamping: 0.8,
             initialSpringVelocity: 0.1,

    public var boundingMargin: CGFloat = 20
    
    fileprivate var gestureRecognizerProxy: UIPanGestureRecognizer?
    fileprivate weak var modalViewController: UIViewController!
    fileprivate var transitionContext: UIViewControllerContextTransitioning?
    fileprivate var panGestureStartLocationY: CGFloat = 0.0
    fileprivate lazy var backgroundView: UIView = {
        let view = UIView(frame: UIScreen.main.bounds)
        view.backgroundColor = .black

        self.gestureRecognizerProxy = gestureRecognizerProxy
    }

    func handlePanGesture(recognizer: UIPanGestureRecognizer) {
        isSwiping = true
        
        let location = recognizer.location(in: modalViewController.view.window)
