I Don't think you can change the text color of Status bar. @JMarsh its not duplicate que. The link you provided is for status bar style not for text.
iphone : How to change the text color ( not the background ) of the status bar?
Question
How do I change the text color of the status bar? I know how to change the background color but not sure how to change the text color?
I need output like this:
I am not sure if it is at all possible under Apple HIG but just want to check if we could at all achieve this.
I have see this is done in the System App "Newsstand" . If you see the color is now exactly black or white. It is actually a light gray .
La solution
Autres conseils
There are some options to specify the look of the UIStatusBarStyle
. For a single UIViewController
use this method:
-(UIStatusBarStyle)preferredStatusBarStyle{
return UIStatusBarStyleLightContent;
}
For the whole app:
[[UIApplication sharedApplication]
setStatusBarStyle:UIStatusBarStyleBlackTranslucent];
There are a couple different styles defined here:
To invoke:
[[UIApplication sharedApplication] setStatusBarStyle:statusBarStyle animated:NO];
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow