I have a use case where with an iPhone I want to show the status bar (battery, Wifi....) in landscape mode. I can't see how to do this.
I've tried the following in my view controller that's inside of a navigation controller.
I've tried the following in my view controller that's inside of a navigation controller.
Code Block override func viewDidLoad() { super.viewDidLoad() NotificationCenter.default.addObserver(self, selector:#selector(orientationChanged), name: UIDevice.orientationDidChangeNotification, object: nil) } override var prefersStatusBarHidden: Bool { return false } @objc func orientationChanged() { setNeedsStatusBarAppearanceUpdate() }