I have problems with colour of text in Status Bar. I want to make colour of text white, but keep black colour on modal views.
I have next configuration:
- Storyboard with settings "Opens in 5.1" and "Project Deployment target 7.0" and "View as iOS7 and later"
UITabBarViewController
- 4
UINavigationControllers
- Each navigation controller has custom subclass of
UIViewController
inside
Background colour of UINavigationBar set to dark via appearance
.
View controller-based status bar appearance
set to YES
My subclass of UITabBarViewController
has next methods:
- (UIStatusBarStyle)preferredStatusBarStyle {
return UIStatusBarStyleLightContent;
}
- (void)viewDidLoad {
[super viewDidLoad];
[self setNeedsStatusBarAppearanceUpdate];
}
These methods are called after application started.
I also have same methods calls in my UIViewControllers
subclasses:
- (UIStatusBarStyle)preferredStatusBarStyle {
return UIStatusBarStyleLightContent; // This method never called
}
- (void)viewDidLoad {
[super viewDidLoad];
[self setNeedsStatusBarAppearanceUpdate];
}
I also tried to change return value of -preferredStatusBarStyle
to UIStatusBarStyleDefault
(well, I know that it should paint text in black, but I tried anyway)
Same thing for setting Status Bar option to Light Content in Storyboard. Doesn't work too.
I know there are a lot of questions on SO similar to mine, but proposed solutions doesn't help in my situation.
My status bar still looks like this:
And I want to change its colour to white =/