yogevbd 6 years ago
parent
commit
6c97a14d3b

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

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

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

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

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

37
 	[self.view addSubview:self.sideMenu.view];
37
 	[self.view addSubview:self.sideMenu.view];
38
 	[self.view bringSubviewToFront:self.sideMenu.view];
38
 	[self.view bringSubviewToFront:self.sideMenu.view];
39
 	
39
 	
40
-	
41
 	return self;
40
 	return self;
42
 }
41
 }
43
 
42
 
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
 - (BOOL)isCustomTransitioned {
92
 - (BOOL)isCustomTransitioned {
76
 	return NO;
93
 	return NO;
77
 }
94
 }

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

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