Status Bar text color

 Status Bar Text Color to White Color !

Lets get started !

Create a new project

Open Xcode 6, create a new “Single Page Application” and select Swift as the programming language.

Supporting Files

Click on the “Supporting Files”group. Click on Info.plist

Something like this should come up.

Screen Shot 2014-08-15 at 9.02.57 PM

Select “Bundle creator OS Type Code” and Click on the small + symbol. Scroll to the end of the list and select the last row which says, “View controller-based status bar appearance”.

Screen Shot 2014-08-15 at 9.07.52 PM

Set its value to NO.

Open AppDelegate

Open AppDelegate.swift and modify as follows.

  func application(application: UIApplication!, didFinishLaunchingWithOptions launchOptions: NSDictionary!) -> Bool {

UIApplication.sharedApplication().setStatusBarStyle(UIStatusBarStyle.LightContent, animated: true)
 
return true
}

And You are all Set ! Go ahead run the application and you can see that the status bar text color now has changed to White !

Feel free to ask questions or point out any mistakes. If you found this useful please take a moment to share this with your friends.

Have a lovely day !!

9 thoughts on “Status Bar text color

  1. Paresh Jain says:

    But how to set the Status Bar Text Color for slash screen. Because the text during the splash screen still remains black. I need to set it as white. Please suggest.

    Like

  2. I found this very helpful, just one question. Can the status bar be white from the start? it seems like for a second or so the status bar content is black and it changes color to white when my screen loads. I tested on Xcode simulator so I’m not even sure if it will matter once the app is actually loaded onto a phone.

    Like

Leave a comment