|
@@ -22,8 +22,8 @@
|
22
|
22
|
}
|
23
|
23
|
|
24
|
24
|
- (void)animateTransition:(id<UIViewControllerContextTransitioning>)transitionContext {
|
25
|
|
- UIViewController* toViewController = [transitionContext viewControllerForKey:UITransitionContextToViewControllerKey];
|
26
|
|
- UIViewController* fromViewController = [transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey];
|
|
25
|
+ UIView* toView = [transitionContext viewForKey:UITransitionContextToViewKey];
|
|
26
|
+ UIView* fromView = [transitionContext viewForKey:UITransitionContextFromViewKey];
|
27
|
27
|
|
28
|
28
|
[CATransaction begin];
|
29
|
29
|
[CATransaction setCompletionBlock:^{
|
|
@@ -31,12 +31,12 @@
|
31
|
31
|
}];
|
32
|
32
|
|
33
|
33
|
if (_isDismiss) {
|
34
|
|
- [[transitionContext containerView] addSubview:toViewController.view];
|
35
|
|
- [[transitionContext containerView] addSubview:fromViewController.view];
|
36
|
|
- [self animateElement:self.transitionOptions view:fromViewController.view elementName:@"content"];
|
|
34
|
+ [[transitionContext containerView] addSubview:toView];
|
|
35
|
+ [[transitionContext containerView] addSubview:fromView];
|
|
36
|
+ [self animateElement:self.transitionOptions view:fromView elementName:@"content"];
|
37
|
37
|
} else {
|
38
|
|
- [[transitionContext containerView] addSubview:toViewController.view];
|
39
|
|
- [self animateElement:self.transitionOptions view:toViewController.view elementName:@"content"];
|
|
38
|
+ [[transitionContext containerView] addSubview:toView];
|
|
39
|
+ [self animateElement:self.transitionOptions view:toView elementName:@"content"];
|
40
|
40
|
}
|
41
|
41
|
|
42
|
42
|
[CATransaction commit];
|