Has anyone noticed that the Status bar color for the iPhone 6 simulator is not using the correct style?
I have UIStatusBarStyle
set to UIStatusBarStyleLightContent
and UIViewControllerBasedStatusBarAppearance
set to NO
.
This works fine for all phones on iOS8 except for 6 and 6 Plus. In my appDelegate I am able to set it using UIApplication.sharedApplication().setStatusBarStyle(.LightContent, animated: false)
but this does not set it for the launch screen. It still wants dark when I would like light content. Does anyone have a fix for this. Is there a new item I need to add the the plist?
One option is to set UIViewControllerBasedStatusBarAppearance
to YES
in the plist, and then in each view controller have this method
- (UIStatusBarStyle) preferredStatusBarStyle {
return UIStatusBarStyleLightContent;
}
It is a pain in the ass to do and definitely not the nicest solution. As it stands, this works on all my view controllers but one, which I'm still looking for an alternative solution for this.
EDIT
Found a better solution. Keep UIViewControllerBasedStatusBarAppearance
to NO
and Status bar style
to UIStatusBarStyleLightContent
in the plist, then add the correct launch image by selecting + -> New Launch Image
from the Image Assets. This will prevent iPhone 6/6+ from scaling the app up to the screen size and show the light status bar. The correct screen sizes are:
iPhone 4/4S: 640x960 px
iPhone 5/5S: 640x1136 px
iPhone 6: 750x1334 px (edited)
iPhone 6+: 1242x2208 px
I can't take credit for this, just testify that it worked. Here is where I found the solution https://stackoverflow.com/a/25985800/3247035 and http://beageek.biz/how-to-create-launch-images-app-xcode-ios/