UIApplication.sharedApplication().setStatusBarStyle(UIStatusBarStyle.LightContent, animated: true)
I use this one to change status bar to light in all app. But now I need to change it in just one View Controller back to black. How can I do that?
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.
Solved:
Swift 3.1
Just using this code in View Controller:
override var preferredStatusBarStyle: UIStatusBarStyle {
return .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