Skip to content

Commit

Permalink
Improved RNNSplashScreen status bar styling (#4698)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgindi authored and yogevbd committed Feb 7, 2019
1 parent eda4b9c commit b3b88d1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ios/RNNSplashScreen.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@

@interface RNNSplashScreen : UIViewController

+(void)showOnWindow:(UIWindow *)window;
+ (void)showOnWindow:(UIWindow *)window;

@end
13 changes: 13 additions & 0 deletions lib/ios/RNNSplashScreen.m
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit b3b88d1

Please sign in to comment.