the status bar style for my application is white except when image picker controller is presented and I have already extend my UINavigationController
but it doesn't seem to be working on any view present only on pushed views does anyone have solution??
extension UINavigationController {
open override var preferredStatusBarStyle: UIStatusBarStyle {
return topViewController?.preferredStatusBarStyle ?? .lightContent
}
}
I have also try this method , but the navigationController is a let and the
preferredStatusBarStyle
is read-only
func navigationController(_ navigationController: UINavigationController, willShow viewController: UIViewController, animated: Bool) {
viewController.navigationItem.title = "willShow"
navigationController.preferredStatusBarStyle = UIStatusBarStyle.lightContent
}