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.
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”.
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 !!
Hi there, tried this out… made my status bar disappear. I removed and replaced the original code. Now the status content is gone. Any ideas of what may have happened?
Thanks!
LikeLike
Sorry, to be clear. It was not the bar that disappeared but rather, the content. “Wifi, Time, Battery”. It was previously black… would not change to light, then tried this and it disappeared completely. Now it won’t come back. I must be missing something.
LikeLike
You won’t be able to see it if your background color is white..
LikeLike
Very straightforward and helpful. Thanks for another great tutorial/tip.
LikeLike
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.
LikeLike
Whats code for Obj C
LikeLike
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent animated:YES];
LikeLike
excellent tutorial..very helpful..thanks a lot Rikin…
LikeLike
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.
LikeLike