               toView,
               belowSubview: fromView)
 
-            fadeView.alpha = 1.0
-            transactionContext.containerView.insertSubview(
-              fadeView,
-              aboveSubview: toView)
-
-            UIView.animate(withDuration: duration) {
+            toViewSnapshot.isOpaque = true
+            transactionContext.containerView.addSubview(toViewSnapshot)
+
+            fadeView.alpha = 0.0
+            transactionContext.containerView.addSubview(fadeView)
+
+            transactionContext.containerView.addSubview(fromViewSnapshot)
+
+            UIView.animate(withDuration: animationTime) {
               fadeView.alpha = 0.01
             }
 
-            fromView.drawAnimatedCircularMask(
+            fromViewSnapshot.drawAnimatedCircularMask(
               startFrame: rect,
               duration: animationTime,
               revealType: revealType) { () -> Void in
+                fromViewSnapshot.removeFromSuperview()
+                fadeView.removeFromSuperview()
+                toViewSnapshot.removeFromSuperview()
                 completion()
                 transitionCompletion?()
             }

              toView,
              aboveSubview: fromView)

            fadeView.alpha = 0.0
            transactionContext.containerView.insertSubview(
              fadeView,
              belowSubview: toView)

            UIView.animate(withDuration: duration) {
              fadeView.alpha = 1.0
            }

            toView.drawAnimatedCircularMask(
              startFrame: rect,
              duration: animationTime,
              revealType: revealType) { () -> Void in
                completion()
                transitionCompletion?()
            }

        
        let toViewController: UIViewController? = transactionContext.viewController(
          forKey: UITransitionContextViewControllerKey.to)

        let fromViewController: UIViewController? = transactionContext.viewController(
          forKey: UITransitionContextViewControllerKey.from)

        if let toView: UIView = toViewController?.view,
          let fromView: UIView = fromViewController?.view,
          let toViewSnapshot: UIView = toView.snapshotView(afterScreenUpdates: true),
          let fromViewSnapshot: UIView = fromView.snapshotView(afterScreenUpdates: true) {

          let fadeView: UIView = UIView(frame: fromView.frame)
          fadeView.backgroundColor = fadeColor
          
          switch revealType {
            
