For non-UINavigationBar status bars

suggest change
  1. In Info.plist set View controller-based status bar appearance (UIViewControllerBasedStatusBarAppearance) to YES.
  2. In view controllers not contained by UINavigationController, implement preferredStatusBarStyle. The Swift below is Swift 2 (LightContent). Swift 3 imports it as the property preferredStatusBarStyle and uses .lightContent.

In Objective-C:

- (UIStatusBarStyle)preferredStatusBarStyle
{ 
    return UIStatusBarStyleLightContent; 
}

In Swift:

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

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents