0

I have 2 types of view controller view background - black and white. I have tried setting the status bar in Storyboard for each after setting the plist value "View controller-based status bar appearance" to YES but it keeps showing the dark colored status bar no matter what.

What's the fix?

iOS8, iphone 5S, Xcode 6

noobsmcgoobs
  • 2,666
  • 5
  • 29
  • 50

1 Answers1

0

You need to add the preferredStatusBarStyleto the view controller. like:

- (UIStatusBarStyle)preferredStatusBarStyle {
    return UIStatusBarStyleDefault;
}

Where UIStatusBarStyleDefault is dark content, for use on light backgrounds and UIStatusBarStyleLightContent is for light content, for use on dark backgrounds.

You might need to call [self setNeedsStatusBarAppearanceUpdate]; in the viewDidLoad to inform the system of a change.

rckoenes
  • 68,719
  • 8
  • 132
  • 164