How to set status bar style to light content on iOS7? How to set status bar style to light content on iOS7? xcode xcode

How to set status bar style to light content on iOS7?


did you try it without "Animated:No" ?

Go to Info tab of the project target, Add Row:

UIViewControllerBasedStatusBarAppearance, set value NO

Then in appdelegate.m

- (BOOL)application:(UIApplication *)application     didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{[application setStatusBarStyle:UIStatusBarStyleLightContent];}

This should set it application wide.


The Accepted answer seemed to work sometimes. I found out that the UIViewController can change the status bar style also. To get around this and always work, cause I didn't need the UIViewControllers controlling the status bar, I had to set UIViewControllerBasedStatusBarAppearance to NO in my Info.plist


Use needsStatusBarAppearanceUpdate to update status bar in viewDidLoad: method of view controller

[self setNeedsStatusBarAppearanceUpdate];

Now add below method into view controller:

- (UIStatusBarStyle) preferredStatusBarStyle {    return UIStatusBarStyleLightContent;}