|
@@ -29,6 +29,10 @@
|
29
|
29
|
UIViewController* topVC = [self topPresentedVC];
|
30
|
30
|
topVC.definesPresentationContext = YES;
|
31
|
31
|
|
|
32
|
+ if (viewController.presentationController) {
|
|
33
|
+ viewController.presentationController.delegate = self;
|
|
34
|
+ }
|
|
35
|
+
|
32
|
36
|
RNNAnimationsTransitionDelegate* tr = [[RNNAnimationsTransitionDelegate alloc] initWithScreenTransition:viewController.resolveOptions.animations.showModal isDismiss:NO];
|
33
|
37
|
if (hasCustomAnimation) {
|
34
|
38
|
viewController.transitioningDelegate = tr;
|
|
@@ -105,6 +109,10 @@
|
105
|
109
|
[_delegate dismissedModal:viewController];
|
106
|
110
|
}
|
107
|
111
|
|
|
112
|
+- (void)presentationControllerDidDismiss:(UIPresentationController *)presentationController {
|
|
113
|
+ [_presentedModals removeObject:presentationController.presentedViewController];
|
|
114
|
+}
|
|
115
|
+
|
108
|
116
|
-(UIViewController*)topPresentedVC {
|
109
|
117
|
UIViewController *root = UIApplication.sharedApplication.delegate.window.rootViewController;
|
110
|
118
|
while(root.presentedViewController) {
|