Next Riot

Swift, Xcode, Cocoa & iOS thoughts, tips, tutorials & tricks by Kyle Gillen of Next Riot

Catch me on Twitter
Subscribe via RSS

Subscribe to my Swift Newsletter

Changing UIStatusBarStyle in Xcode 7.2 (iOS 9.2)

Posted on

Changing UIStatusBarStyle across the entire app

Add/Change the following lines in your app’s info.plist file

View controller-based status bar appearance : NO Status bar style : UIStatusBarStyleLightContent

(also accepts: Gray style (default), Transparent black style (alpha of 0.5), or Opaque black style)

Lines to be changed in your projects info.plist

That’s it. No code required.

Changing UIStatusBarStyle on a per View Controller basis

Alternatively, if you need to change the status bar’s style due to a light / dark background view – with the default setup intact, add the following method to each view controller you’d like to change: