Browse Source

show modal with stack holding external viewController

yogevbd 6 years ago
parent
commit
51312b165a
2 changed files with 10 additions and 1 deletions
  1. 6
    1
      lib/ios/RNNModalManager.m
  2. 4
    0
      lib/ios/RNNNavigationController.m

+ 6
- 1
lib/ios/RNNModalManager.m View File

@@ -36,7 +36,12 @@
36 36
 -(void)showModal:(UIViewController *)viewController completion:(RNNTransitionCompletionBlock)completion {
37 37
 	self.toVC = (UIViewController<RNNRootViewProtocol>*)viewController;
38 38
 	_completionBlock = completion;
39
-	[self waitForContentToAppearAndThen:@selector(showModalAfterLoad:)];
39
+	
40
+	if ([self.toVC isCustomViewController]) {
41
+		[self showModalAfterLoad:nil];
42
+	} else {
43
+		[self waitForContentToAppearAndThen:@selector(showModalAfterLoad:)];
44
+	}
40 45
 }
41 46
 
42 47
 -(void)dismissModal:(NSString *)componentId {

+ 4
- 0
lib/ios/RNNNavigationController.m View File

@@ -12,6 +12,10 @@
12 12
 	return NO;
13 13
 }
14 14
 
15
+- (BOOL)isCustomViewController {
16
+	return [((UIViewController<RNNRootViewProtocol>*)self.topViewController) isCustomViewController];
17
+}
18
+
15 19
 - (BOOL)isAnimated {
16 20
 	UIViewController<RNNRootViewProtocol>* rootVC = (UIViewController<RNNRootViewProtocol>*) self.topViewController;
17 21
 	return rootVC.isAnimated;