1

I was using [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent]; before, which was working fine, but is deprecated in iOS 9.0.

Following this:
UIApplication.sharedApplication().setStatusBarStyle() deprecated in iOS 9

in the project settings under "Deployment Info" I selected "Light" as "Status Bar Style". Checking my Info.plist file, I also have "View controller-based status bar appearance" set to NO.

Now the "small" iPhones 5S/SE will correctly show a white statusbar, but iPhone 6(+)/7(+) will show a black statusbar.

How can I fix this?

[solved]

Actually, after finding this: Status Bar showing black text, only on iPhone 6 iOS 8 simulator

I was able to work it out. I had to put either launch images for the non-working iphone models, or what I now did, use a launch storyboard. Now everything is white statusbar.

user826955
  • 3,137
  • 2
  • 30
  • 71

3 Answers3

1

I think you have to go on your project general setting and set the status bar style light and than go to info Info.plist file and set "View controller-based status bar appearance" set to NO. if it will not work than you have to make object of UIStatusbar in ViewControllers like this.

override var preferredStatusBarStyle: UIStatusBarStyle {
        return .lightContent
    }

Call preferredStatusBarStyle in view did load.

Aditya Srivastava
  • 2,630
  • 2
  • 13
  • 23
1

For Swift.

override var preferredStatusBarStyle: UIStatusBarStyle {
  return .lightContent
}

For Objective c

- (UIStatusBarStyle)preferredStatusBarStyle
{
    return UIStatusBarStyleLightContent;
}

Using Xcode

1.Go to Project ==> Target.

2.Set Status Bar Style to Light.

3.Set View controller-based status bar appearance equal to NO in Info.plist.

Dixit Akabari
  • 2,419
  • 13
  • 26
1

Actually, after finding this: Status Bar showing black text, only on iPhone 6 iOS 8 simulator

I was able to work it out. I had to put either launch images for the non-working iphone models, or what I now did, use a launch storyboard. Now everything is white statusbar.

user826955
  • 3,137
  • 2
  • 30
  • 71