From b3b88d15bbb730b96de1fa2c0378d0f3c59b53ab Mon Sep 17 00:00:00 2001 From: Daniel Cohen Gindi Date: Thu, 7 Feb 2019 11:04:47 +0200 Subject: [PATCH] Improved RNNSplashScreen status bar styling (#4698) --- lib/ios/RNNSplashScreen.h | 2 +- lib/ios/RNNSplashScreen.m | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/lib/ios/RNNSplashScreen.h b/lib/ios/RNNSplashScreen.h index 96788412f78..655c0ee63f2 100644 --- a/lib/ios/RNNSplashScreen.h +++ b/lib/ios/RNNSplashScreen.h @@ -3,6 +3,6 @@ @interface RNNSplashScreen : UIViewController -+(void)showOnWindow:(UIWindow *)window; ++ (void)showOnWindow:(UIWindow *)window; @end diff --git a/lib/ios/RNNSplashScreen.m b/lib/ios/RNNSplashScreen.m index e69b101f8e5..acb07a87085 100644 --- a/lib/ios/RNNSplashScreen.m +++ b/lib/ios/RNNSplashScreen.m @@ -73,4 +73,17 @@ + (void)showOnWindow:(UIWindow *)window { } } +- (UIStatusBarStyle)preferredStatusBarStyle { + NSString *styleString = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UIStatusBarStyle"]; + + if ([styleString isEqualToString:@"UIStatusBarStyleLightContent"]) + return UIStatusBarStyleLightContent; + + return UIStatusBarStyleDefault; +} + +- (BOOL)prefersStatusBarHidden { + return [[[NSBundle mainBundle] objectForInfoDictionaryKey:@"UIStatusBarHidden"] boolValue]; +} + @end