Browse Source

Adresses #3963 - stack options applied to children

yogevbd 5 years ago
parent
commit
69c3e0dea8
1 changed files with 15 additions and 0 deletions
  1. 15
    0
      lib/ios/RNNNavigationController.m

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

@@ -57,5 +57,20 @@
57 57
 	return self.topViewController;
58 58
 }
59 59
 
60
+- (void)setViewControllers:(NSArray<__kindof UIViewController *> *)viewControllers {
61
+	[super setViewControllers:viewControllers];
62
+	for (UIViewController<RNNRootViewProtocol>* viewController in viewControllers) {
63
+		if (viewController.layoutInfo.options) {
64
+			[viewController.layoutInfo.options mergeOptions:self.layoutInfo.options overrideOptions:NO];
65
+		}
66
+	}
67
+}
68
+
69
+- (void)pushViewController:(UIViewController<RNNRootViewProtocol> *)viewController animated:(BOOL)animated {
70
+	[super pushViewController:viewController animated:animated];
71
+	if (viewController.layoutInfo.options) {
72
+		[viewController.layoutInfo.options mergeOptions:self.layoutInfo.options overrideOptions:NO];
73
+	}
74
+}
60 75
 
61 76
 @end