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.
First, select your
Projectand in theGenernaltab you will see something like this.enter image description here
Then set
Status Bar StyletoLightjust like the image.Second, set
View controller-based status bar appearance equaltoNOin Info.plist. If you can't find it, just add a new row and set it like the above step.And then, run your app you will see the Status bar text colour is white. :)