         return animationController
     }
     
+    func animationController(forDismissed dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? {
+        return animationController
+    }
+    
 }
 
 class AnimationController: NSObject, UIViewControllerAnimatedTransitioning {

    }
    
    func animateTransition(using transitionContext: UIViewControllerContextTransitioning) {
        propertyAnimator = presentingPropertyAnimator(using: transitionContext)
        propertyAnimator?.startAnimation()
    }
    
    private func isPresentingTransition(transitionContext: UIViewControllerContextTransitioning) -> Bool {
        guard let toVC = transitionContext.viewController(forKey: .to) else { return true }
        let isPresentingFirst = toVC is ThumbImageViewController
        return isPresentingFirst
    }
    
    private func presentingPropertyAnimator(using transitionContext: UIViewControllerContextTransitioning) -> UIViewPropertyAnimator? {

        let fromVC = transitionContext.viewController(forKey: .from) as? ThumbImageViewController
        guard let originalRoundedView = fromVC?.thumbImageView  else { return nil }

    
    // MARK: - Constraints setup
    
    private func setupViewFullScreenConstraints(roundedView: UIView) {
        let views = ["roundedView": roundedView]
        let horizont = NSLayoutConstraint.constraints(withVisualFormat: "H:|[roundedView]|", options:.alignAllBottom, metrics: nil, views: views)
        let vertical = NSLayoutConstraint.constraints(withVisualFormat: "V:|[roundedView]|", options:.alignAllBottom, metrics: nil, views: views)
