When adding status bar as light content. its appearing fine in login screen. it changes to white in login screen. after successful login I have an split view and navigation controller.
I have added the code but still it shows black.
1) added below line in view contoller.
override var preferredStatusBarStyle: UIStatusBarStyle {
return .lightContent
}
2) info.plist
View controller-based status bar appearance -> NO
3) then came across this line and added this one also.
controller.navigationController?.navigationBar.barTintColor = UIColor.white
4) then came across article where it was mentioned to add extension if we need to change status bar in navigation but still nothing works
extension UINavigationController
{
override open var preferredStatusBarStyle: UIStatusBarStyle {
get {
return .lightContent
}
}
}
I have added and tried with each of them but still it shows black status bar.