Explorar el Código

Improved RNNSplashScreen status bar styling (#4698)

Daniel Cohen Gindi hace 6 años
padre
commit
b3b88d15bb
Se han modificado 2 ficheros con 14 adiciones y 1 borrados
  1. 1
    1
      lib/ios/RNNSplashScreen.h
  2. 13
    0
      lib/ios/RNNSplashScreen.m

+ 1
- 1
lib/ios/RNNSplashScreen.h Ver fichero

@@ -3,6 +3,6 @@
3 3
 
4 4
 @interface RNNSplashScreen : UIViewController
5 5
 
6
-+(void)showOnWindow:(UIWindow *)window;
6
++ (void)showOnWindow:(UIWindow *)window;
7 7
 
8 8
 @end

+ 13
- 0
lib/ios/RNNSplashScreen.m Ver fichero

@@ -73,4 +73,17 @@
73 73
 	}
74 74
 }
75 75
 
76
+- (UIStatusBarStyle)preferredStatusBarStyle {
77
+	NSString *styleString = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UIStatusBarStyle"];
78
+	
79
+	if ([styleString isEqualToString:@"UIStatusBarStyleLightContent"])
80
+		return UIStatusBarStyleLightContent;
81
+	
82
+	return UIStatusBarStyleDefault;
83
+}
84
+
85
+- (BOOL)prefersStatusBarHidden {
86
+	return [[[NSBundle mainBundle] objectForInfoDictionaryKey:@"UIStatusBarHidden"] boolValue];
87
+}
88
+
76 89
 @end