|
@@ -13,10 +13,9 @@
|
13
|
13
|
return self;
|
14
|
14
|
}
|
15
|
15
|
|
16
|
|
--(void)showModalAfterLoad:(NSDictionary*)notif {
|
|
16
|
+-(void)showModal:(BOOL)animated {
|
17
|
17
|
UIViewController* topVC = [self topPresentedVC];
|
18
|
18
|
topVC.definesPresentationContext = YES;
|
19
|
|
- BOOL animated = true;
|
20
|
19
|
|
21
|
20
|
if ([topVC conformsToProtocol:@protocol(RNNRootViewProtocol)]) {
|
22
|
21
|
UIViewController<RNNRootViewProtocol> *navigationTopVC = (UIViewController<RNNRootViewProtocol>*)topVC;
|
|
@@ -24,11 +23,7 @@
|
24
|
23
|
if (options.animations.showModal.hasCustomAnimation) {
|
25
|
24
|
self.toVC.transitioningDelegate = navigationTopVC;
|
26
|
25
|
}
|
27
|
|
-
|
28
|
|
- animated = options.animations.showModal.enable;
|
29
|
26
|
}
|
30
|
|
-
|
31
|
|
-
|
32
|
27
|
|
33
|
28
|
[topVC presentViewController:self.toVC animated:animated completion:^{
|
34
|
29
|
if (_completionBlock) {
|
|
@@ -39,7 +34,7 @@
|
39
|
34
|
}];
|
40
|
35
|
}
|
41
|
36
|
|
42
|
|
--(void)showModal:(UIViewController *)viewController completion:(RNNTransitionCompletionBlock)completion {
|
|
37
|
+-(void)showModal:(UIViewController *)viewController animated:(BOOL)animated completion:(RNNTransitionCompletionBlock)completion {
|
43
|
38
|
self.toVC = (UIViewController<RNNRootViewProtocol>*)viewController;
|
44
|
39
|
RNNNavigationOptions* options = self.toVC.getLeafViewController.options;
|
45
|
40
|
|
|
@@ -52,10 +47,10 @@
|
52
|
47
|
if ([self.toVC respondsToSelector:@selector(isCustomViewController)] &&
|
53
|
48
|
[self.toVC.getLeafViewController isCustomViewController]
|
54
|
49
|
) {
|
55
|
|
- [self showModalAfterLoad:nil];
|
|
50
|
+ [self showModal:animated];
|
56
|
51
|
} else {
|
57
|
52
|
[self.toVC.getLeafViewController waitForReactViewRender:options.animations.showModal.waitForRender perform:^{
|
58
|
|
- [self showModalAfterLoad:nil];
|
|
53
|
+ [self showModal:animated];
|
59
|
54
|
}];
|
60
|
55
|
}
|
61
|
56
|
}
|