|
@@ -1,7 +1,7 @@
|
1
|
1
|
#import "RNNModalManager.h"
|
2
|
2
|
#import "RNNComponentViewController.h"
|
3
|
3
|
#import "RNNAnimationsTransitionDelegate.h"
|
4
|
|
-#import "RNNLayoutProtocol.h"
|
|
4
|
+#import "UIViewController+LayoutProtocol.h"
|
5
|
5
|
|
6
|
6
|
@implementation RNNModalManager {
|
7
|
7
|
NSMutableArray* _pendingModalIdsToDismiss;
|
|
@@ -43,7 +43,7 @@
|
43
|
43
|
completion(nil);
|
44
|
44
|
}
|
45
|
45
|
|
46
|
|
- [_presentedModals addObject:viewController.navigationController ? viewController.navigationController : viewController];
|
|
46
|
+ [self->_presentedModals addObject:[viewController topMostViewController]];
|
47
|
47
|
}];
|
48
|
48
|
}
|
49
|
49
|
|
|
@@ -118,13 +118,13 @@
|
118
|
118
|
}
|
119
|
119
|
|
120
|
120
|
- (void)dismissedModal:(UIViewController *)viewController {
|
121
|
|
- [_presentedModals removeObject:viewController.navigationController ? viewController.navigationController : viewController];
|
122
|
|
- [_delegate dismissedModal:viewController];
|
|
121
|
+ [_presentedModals removeObject:[viewController topMostViewController]];
|
|
122
|
+ [_delegate dismissedModal:viewController.presentedComponentViewController];
|
123
|
123
|
}
|
124
|
124
|
|
125
|
125
|
- (void)presentationControllerDidDismiss:(UIPresentationController *)presentationController {
|
126
|
126
|
[_presentedModals removeObject:presentationController.presentedViewController];
|
127
|
|
- [_delegate dismissedModal:presentationController.presentedViewController];
|
|
127
|
+ [_delegate dismissedModal:presentationController.presentedViewController.presentedComponentViewController];
|
128
|
128
|
}
|
129
|
129
|
|
130
|
130
|
-(UIViewController*)topPresentedVC {
|