Browse Source

statusBarStyle support

yogevbd 6 years ago
parent
commit
66c18fbf6f

+ 1
- 0
lib/ios/RNNNavigationOptions.h View File

34
 @property (nonatomic, strong) id orientation;
34
 @property (nonatomic, strong) id orientation;
35
 @property (nonatomic, strong) NSNumber* statusBarBlur;
35
 @property (nonatomic, strong) NSNumber* statusBarBlur;
36
 @property (nonatomic, strong) NSNumber* statusBarHideWithTopBar;
36
 @property (nonatomic, strong) NSNumber* statusBarHideWithTopBar;
37
+@property (nonatomic, strong) NSString* statusBarStyle;
37
 @property (nonatomic, strong) NSNumber* popGesture;
38
 @property (nonatomic, strong) NSNumber* popGesture;
38
 @property (nonatomic, strong) UIImage* backgroundImage;
39
 @property (nonatomic, strong) UIImage* backgroundImage;
39
 @property (nonatomic, strong) UIImage* rootBackgroundImage;
40
 @property (nonatomic, strong) UIImage* rootBackgroundImage;

+ 2
- 0
lib/ios/RNNNavigationOptions.m View File

20
 -(instancetype)initWithDict:(NSDictionary *)options {
20
 -(instancetype)initWithDict:(NSDictionary *)options {
21
 	self = [super init];
21
 	self = [super init];
22
 	self.statusBarHidden = [options objectForKey:@"statusBarHidden"];
22
 	self.statusBarHidden = [options objectForKey:@"statusBarHidden"];
23
+	self.statusBarBlur = [options objectForKey:@"statusBarBlur"];
24
+	self.statusBarStyle = [options objectForKey:@"statusBarStyle"];
23
 	self.screenBackgroundColor = [options objectForKey:@"screenBackgroundColor"];
25
 	self.screenBackgroundColor = [options objectForKey:@"screenBackgroundColor"];
24
 	self.backButtonTransition = [options objectForKey:@"backButtonTransition"];
26
 	self.backButtonTransition = [options objectForKey:@"backButtonTransition"];
25
 	self.orientation = [options objectForKey:@"orientation"];
27
 	self.orientation = [options objectForKey:@"orientation"];

+ 8
- 0
lib/ios/RNNRootViewController.m View File

120
 	return NO;
120
 	return NO;
121
 }
121
 }
122
 
122
 
123
+- (UIStatusBarStyle)preferredStatusBarStyle {
124
+	if (self.options.statusBarStyle && [self.options.statusBarStyle isEqualToString:@"light"]) {
125
+		return UIStatusBarStyleLightContent;
126
+	} else {
127
+		return UIStatusBarStyleDefault;
128
+	}
129
+}
130
+
123
 - (UIInterfaceOrientationMask)supportedInterfaceOrientations {
131
 - (UIInterfaceOrientationMask)supportedInterfaceOrientations {
124
 	return self.options.supportedOrientations;
132
 	return self.options.supportedOrientations;
125
 }
133
 }