I'm trying to convert my iOS 7 app to iOS 8 in Xcode 6 GM, and when i run it on the iPhone 5s or lower simulators with iOS 8 everything is fine, but on the iPhone 6 and 6 Plus simulators, the Status Bar has black text instead of white like it is everywhere anytime else. I've set the Info.plist UIStatusBarStyle to "Transparent Black Style (alpha of 0.5)" thru Xcode, and that seems to have the desired effect everywhere else. Any ideas what is going on?
(I haven't touched any of the storyboards yet, could it be anything with that? I was hoping I could put that off for a while:)
A good fix for this is to use the new launch image nib support which gets used on the iPhone 6 models. It seems like there's just a bug in iOS 8 that means that the iPhone 6 models don't check the status bar style correctly when launching but it gets solved if you add in the launch nib.
As Aaron Wasserman pointed out you can also specify iPhone 6 & 6+ launch PNGs and that seems to fix the problem too, so long as you set them up right!
In your Storyboard select your root view controller and set status bar type default
This bug only occurs if your app is being scaled to fit the resolution of the newer devices.
A quick fix (who knows whether this will even get addressed in 8.1) is to provide the proper resolution loading images in your app package.
From https://developer.apple.com/ios/human-interface-guidelines/graphics/launch-screen/
In my app, we only support portrait, so providing the 750x1334 and 1242x2208 fixed it.
And just to confirm in case it wasn't obvious, you DO need to be using UIStatusBarStyleLightContent for your status bar style.
I know it's bad style to override behaviour in a base class using a category, but this works and may be the quickest solution to fix it.
Step #1: Ensure
UIViewControllerBasedStatusBarAppearance
orView controller-based status bar appearance
is set toYES
in your application plist file.Step #2: Add the following code to your project:
So here is how I fixed it
In PLIST View Controller Based Status Bar NO Status Bar Style UIStatusBarStyleLightContent
In AppDelegate DidFinishLaunching
In Each View Controller
Done.