yogevbd 6 years ago
parent
commit
6c97a14d3b

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

@@ -20,6 +20,10 @@
20 20
 	[((UIViewController<RNNRootViewProtocol>*)self.topViewController) mergeOptions:options];
21 21
 }
22 22
 
23
+- (UIStatusBarStyle)preferredStatusBarStyle {
24
+	return ((UIViewController<RNNRootViewProtocol>*)self.topViewController).preferredStatusBarStyle;
25
+}
26
+
23 27
 - (NSString *)componentId {
24 28
 	return _componentId ? _componentId : ((UIViewController<RNNRootViewProtocol>*)self.topViewController).componentId;
25 29
 }

+ 5
- 3
lib/ios/RNNSideMenuChildVC.m View File

@@ -20,9 +20,7 @@
20 20
 -(instancetype) initWithChild:(UIViewController<RNNRootViewProtocol>*)child type:(RNNSideMenuChildType)type {
21 21
 	self = [super init];
22 22
 	
23
-	self.child = child;
24
-	[self addChildViewController:self.child];
25
-	
23
+	self.child = child;	
26 24
 	[self addChildViewController:self.child];
27 25
 	[self.child.view setFrame:self.view.bounds];
28 26
 	[self.view addSubview:self.child.view];
@@ -33,6 +31,10 @@
33 31
 	return self;
34 32
 }
35 33
 
34
+- (UIStatusBarStyle)preferredStatusBarStyle {
35
+	return self.child.preferredStatusBarStyle;
36
+}
37
+
36 38
 - (BOOL)isCustomTransitioned {
37 39
 	return NO;
38 40
 }

+ 18
- 1
lib/ios/RNNSideMenuController.m View File

@@ -37,7 +37,6 @@
37 37
 	[self.view addSubview:self.sideMenu.view];
38 38
 	[self.view bringSubviewToFront:self.sideMenu.view];
39 39
 	
40
-	
41 40
 	return self;
42 41
 }
43 42
 
@@ -72,6 +71,24 @@
72 71
 	}
73 72
 }
74 73
 
74
+- (UIStatusBarStyle)preferredStatusBarStyle {
75
+	return self.openedViewController.preferredStatusBarStyle;
76
+}
77
+
78
+- (UIViewController *)openedViewController {
79
+	switch (self.sideMenu.openSide) {
80
+		case MMDrawerSideNone:
81
+			return self.center;
82
+		case MMDrawerSideLeft:
83
+			return self.left;
84
+		case MMDrawerSideRight:
85
+			return self.right;
86
+		default:
87
+			return self.center;
88
+			break;
89
+	}
90
+}
91
+
75 92
 - (BOOL)isCustomTransitioned {
76 93
 	return NO;
77 94
 }

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

@@ -57,6 +57,10 @@
57 57
 	return ((UIViewController<RNNRootViewProtocol>*)self.selectedViewController).componentId;
58 58
 }
59 59
 
60
+- (UIStatusBarStyle)preferredStatusBarStyle {
61
+	return ((UIViewController<RNNRootViewProtocol>*)self.selectedViewController).preferredStatusBarStyle;
62
+}
63
+
60 64
 #pragma mark UITabBarControllerDelegate
61 65
 
62 66
 - (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController {