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
Swift 3.0
Just set View controller-based status bar appearance == NO
in to your *.plist
and put below code in your appdelegate class in didFinishLaunchingWithOptions
method before return
.
let statusBar: UIView = UIApplication.shared.value(forKey: "statusBar") as! UIView
if statusBar.responds(to:#selector(setter: UIView.backgroundColor)) {
statusBar.backgroundColor = UIColor.red
}
UIApplication.shared.statusBarStyle = .lightContent
You can change backgroundColor
and statusBarStyle
as per your requirement.