Maxim Tsybanov Maxim Tsybanov - 1 year ago 125
Swift Question

Color text of status bar in XCode 6-b3 (Swift)

I've try to modify status bar color text but no one answer from this thread doesn't work.
Any especially for XCode 6?

I've tried insert:

override func preferredStatusBarStyle() -> UIStatusBarStyle {
return UIStatusBarStyle.LightContent



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


And I've tried change it in

But it doesn't affect it. How change status bar color text to white?

Answer Source

In your Info.plist you need to define View controller-based status bar appearance to any value.

enter image description here

If you define it YES then you should override preferredStatusBarStyle function in each view controller.

If you define it NO then you can set style in AppDelegate using

UIApplication.sharedApplication().statusBarStyle = .LightContent

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download