How to change status bar style during launch on iOS 7

When I launch my app, it shows the launch image and a black status bar. How can I change it so the status bar is light during launch? I have set the status bar appearance to light in my AppDelegate didFinishLoading method, and it works for the rest of the app.


Solution 1:

To your Info.plist file add this key-value pair:

UIStatusBarStyle: UIStatusBarStyleLightContent

The default (black) value is UIStatusBarStyleDefault.

You can also append ~iphone or ~ipad to the key.

Solution 2:

There are 2 steps:

  1. This is usually what developers know how to do – Under Target settings > General > Status Bar Style > Change to Light. This will effect the Info.plist to include UIStatusBarStyleLightContent.

  2. This step is often missed out – In Info.plist, add View controller-based status bar appearance and set to NO

Solution 3:

Just define this method in any view or file you want:

- (UIStatusBarStyle)preferredStatusBarStyle
{
    return UIStatusBarStyleLightContent;
}

// swift 
override func preferredStatusBarStyle() -> UIStatusBarStyle {
    return .LightContent
}