File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,15 @@ - (void)animateTransition:(id <UIViewControllerContextTransitioning>)transitionC
5353 }];
5454
5555 } completion: ^(BOOL finished) {
56+ // Bring the from view back to the front and re-disable the user
57+ // interaction of the to view since the dismissal has been cancelled
58+ if ([transitionContext transitionWasCancelled ])
59+ {
60+ [transitionContext.containerView bringSubviewToFront:
61+ fromViewController.view];
62+ toViewController.view .userInteractionEnabled = NO ;
63+ }
64+
5665 fromViewController.view .layer .transform = CATransform3DIdentity;
5766 toViewController.view .layer .transform = CATransform3DIdentity;
5867 transitionContext.containerView .layer .transform = CATransform3DIdentity;
@@ -93,6 +102,15 @@ - (void)animateTransition:(id <UIViewControllerContextTransitioning>)transitionC
93102 }];
94103
95104 } completion: ^(BOOL finished) {
105+ // Bring the from view back to the front and re-enable its user
106+ // interaction since the presentation has been cancelled
107+ if ([transitionContext transitionWasCancelled ])
108+ {
109+ [transitionContext.containerView bringSubviewToFront:
110+ fromViewController.view];
111+ fromViewController.view .userInteractionEnabled = YES ;
112+ }
113+
96114 fromViewController.view .layer .transform = CATransform3DIdentity;
97115 toViewController.view .layer .transform = CATransform3DIdentity;
98116 transitionContext.containerView .layer .transform = CATransform3DIdentity;
You can’t perform that action at this time.
0 commit comments