iOS Dev Nugget 83 Match Status Bar Style in Launch Screen With Your App's


Need to run a code review on your codebase? Hire me

Since iOS 7, the following methods have been introduced in UIViewController so you can control the status bar on a per-View Controller basis:

- (BOOL)prefersStatusBarHidden
- (UIStatusBarAnimation)preferredStatusBarUpdateAnimation
- (void)setNeedsStatusBarAppearanceUpdate
- (UIStatusBarStyle)preferredStatusBarStyle

-preferredStatusBarStyle is commonly used. Since there's a slight pause at the launch screen (showing Default.png and its variations), you'll want to make sure the status bar style used in the launch screen matches your app's initial screen's.

You can do this by editing your app's Info.plist, adding a property called Status bar style (UIStatusBarStyle) and instead of selecting a value from the drop down, type UIStatusBarStyleLightContent or UIStatusBarStyleDefault yourself.

Your feedback is valuable: Do you want more nuggets like this?   Yes   or   No



Like this and want such iOS dev nuggets to be emailed to you, weekly?

Sign Me Up! or follow @iosdevnuggets on Twitter


View archives of past issues