In some of app's view controllers status bar is hidden. But when user opens the app from a background, status bar becomes visible for a second, and then hides. I tried:
- to put
[[UIApplication sharedApplication] setStatusBarHidden:YES]
intoapplicationWillEnterForeground:
method. However, status bar becomes visible before this method is called. - check status bar's visibility when
applicationWillResignActive
:self.isStatusBarHidden = [UIApplication sharedApplication].statusBarHidden ? YES : NO;
, but it returns<nil>
. (Then I wanted to hide status bar and show it whenapplicationWillEnterForeground
- this leads to a completely opposite situation)
How to solve this problem?
P.S. View controller-based status bar appearance
in my .plist file is equal to NO and Status bar is initially hidden
is equal to NO too.
Are you keeping your settings like this?
You need to check status bar style Hide during application launch.