|
@@ -14,15 +14,23 @@
|
14
|
14
|
}
|
15
|
15
|
|
16
|
16
|
-(void)showModalAfterLoad:(NSDictionary*)notif {
|
17
|
|
- UIViewController<RNNRootViewProtocol>* topVC = (UIViewController<RNNRootViewProtocol>*)[self topPresentedVC];
|
|
17
|
+ UIViewController* topVC = [self topPresentedVC];
|
18
|
18
|
topVC.definesPresentationContext = YES;
|
19
|
|
- RNNNavigationOptions* options = topVC.getLeafViewController.options;
|
20
|
|
-
|
21
|
|
- if (options.animations.showModal.hasCustomAnimation) {
|
22
|
|
- self.toVC.transitioningDelegate = topVC;
|
|
19
|
+ BOOL animated = true;
|
|
20
|
+
|
|
21
|
+ if ([topVC conformsToProtocol:@protocol(RNNRootViewProtocol)]) {
|
|
22
|
+ UIViewController<RNNRootViewProtocol> *navigationTopVC = (UIViewController<RNNRootViewProtocol>*)topVC;
|
|
23
|
+ RNNNavigationOptions* options = navigationTopVC.getLeafViewController.options;
|
|
24
|
+ if (options.animations.showModal.hasCustomAnimation) {
|
|
25
|
+ self.toVC.transitioningDelegate = navigationTopVC;
|
|
26
|
+ }
|
|
27
|
+
|
|
28
|
+ animated = options.animations.showModal.enable;
|
23
|
29
|
}
|
|
30
|
+
|
|
31
|
+
|
24
|
32
|
|
25
|
|
- [topVC presentViewController:self.toVC animated:options.animations.showModal.enable completion:^{
|
|
33
|
+ [topVC presentViewController:self.toVC animated:animated completion:^{
|
26
|
34
|
if (_completionBlock) {
|
27
|
35
|
_completionBlock();
|
28
|
36
|
_completionBlock = nil;
|