     }
     
     func animateTransition(transitionContext: UIViewControllerContextTransitioning) {
-        guard let fromView = transitionContext.viewForKey(UITransitionContextFromViewKey),
+        guard let containerView = transitionContext.containerView(),
+            fromView = transitionContext.viewForKey(UITransitionContextFromViewKey),
             toView = transitionContext.viewForKey(UITransitionContextToViewKey) else {
-            return
-        }
-        
-        presentTransition(transitionContext, toView: toView, fromView: fromView)
-    }
-}
-
-extension SimplePushAnimator {
-    private func presentTransition(transitionContext: UIViewControllerContextTransitioning, toView: UIView, fromView: UIView) {
-        guard let containerView = transitionContext.containerView() else {
             return
         }
         

            transitionContext.completeTransition(true)
        }
    }
}

    }
    
    func animateTransition(transitionContext: UIViewControllerContextTransitioning) {
        guard let containerView = transitionContext.containerView(),
            fromView = transitionContext.viewForKey(UITransitionContextFromViewKey),
            toView = transitionContext.viewForKey(UITransitionContextToViewKey) else {
                return
        }
        
        containerView.insertSubview(toView, belowSubview: fromView)
