Sfoglia il codice sorgente

Improved RNNSplashScreen status bar styling (#4698)

Daniel Cohen Gindi 6 anni fa
parent
commit
b3b88d15bb
2 ha cambiato i file con 14 aggiunte e 1 eliminazioni
  1. 1
    1
      lib/ios/RNNSplashScreen.h
  2. 13
    0
      lib/ios/RNNSplashScreen.m

+ 1
- 1
lib/ios/RNNSplashScreen.h Vedi File

@@ -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 Vedi File

@@ -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