Post

Replies

Boosts

Views

Created

On iPhone Show status bar in landscape mode
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. 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() }
1
0
874
Jan ’21