I know I can change the iPhone's status bar text color, using methods described here.
However, my app has different themes, and I need to update the status bar accordingly.
Calling
[self setNeedsStatusBarAppearanceUpdate];
and
-(UIStatusBarStyle)preferredStatusBarStyle{
return UIStatusBarStyleLightContent;
}
will obviously not work. However, it needs to be local, as in only for a specific TabBar view.
Just for the ones who come here for the title. You can set a flag and toggle between the status bar text colors like in the code segment given:
}
Also note that, this
preferredStatusBarStyle
method is called whenever we call:[self setNeedsStatusBarAppearanceUpdate];
Hope it helps.