         }
     }
     
-    private func center() {
+    func center() {
         view.frame.origin = .zero
     }
     


extension SlideTransitionAnimator: UIViewControllerAnimatedTransitioning {
    
    typealias AnimateTransitionHandler = (UIViewControllerContextTransitioning) -> ()
    
    func transitionDuration(using transitionContext: UIViewControllerContextTransitioning?) -> TimeInterval {
        return duration

        UIView.animate(withDuration: duration, delay: 0, options: options.option, animations: {
            fromViewController.updateFrame(with: self.direction, reverse: true)
            toViewController.center()
        }, completion: transitionContext.completion)
    }
    
    private func dismiss(using transitionContext: UIViewControllerContextTransitioning) {
        let (fromViewController, toViewController) = configure(using: transitionContext)
        
        
        UIView.animate(withDuration: duration, delay: 0, options: options.option, animations: {
            fromViewController.updateFrame(with: self.direction)
            toViewController.center()
        }, completion: transitionContext.completion)
    }
}

