diff --git a/React/Views/RCTModalHostViewController.m b/React/Views/RCTModalHostViewController.m index 192e7ffb9..73c8ee736 100644 --- a/React/Views/RCTModalHostViewController.m +++ b/React/Views/RCTModalHostViewController.m @@ -12,6 +12,20 @@ @implementation RCTModalHostViewController { CGRect _lastViewFrame; + UIStatusBarStyle _preferredStatusBarStyle; + BOOL _preferredStatusBarHidden; +} + +- (instancetype)init +{ + if (!(self = [super init])) { + return nil; + } + + _preferredStatusBarStyle = [[UIApplication sharedApplication] statusBarStyle]; + _preferredStatusBarHidden = [[UIApplication sharedApplication] isStatusBarHidden]; + + return self; } - (void)viewDidLayoutSubviews @@ -34,4 +48,14 @@ } } +- (UIStatusBarStyle)preferredStatusBarStyle +{ + return _preferredStatusBarStyle; +} + +- (BOOL)prefersStatusBarHidden +{ + return _preferredStatusBarHidden; +} + @end