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
}
to UIViewController
also
UIApplication.sharedApplication().setStatusBarStyle(UIStatusBarStyle.LightContent, animated: true)
to AppDelegate.swift
And I've tried change it in info.plist
But it doesn't affect it. How change status bar color text to white?
Open your info. plist and set UIViewControllerBasedStatusBarAppearance to false . In the first function in AppDelegate. swift , which contains didFinishLaunchingWithOptions , set the color you want.
Go to Project -> Target , Then set Status Bar Style to Light . It makes status-bar white from the launch screen. Then set View controller-based status bar appearance equal to NO in Info.
Open you Info. Add View controller-based status bar appearance key ( UIViewControllerBasedStatusBarAppearance ) and set value to No ( false ). Add Status bar style key ( UIStatusBarStyle ) and set value to Light Content ( UIStatusBarStyleLightContent ).
In your Info.plist you need to define View controller-based status bar appearance to any value.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With