Swift 3 | Unable to hide status bar on a ViewController
问题 I want to show the status bar on portrait mode only, when I rotate the screen the status bar hides as intended but if I push / show a new View Controller the status bar appears again. I've tried the following without success: Setting View controller-based status bar appearance to NO in the info.plist file Using setNeedsStatusBarAppearanceUpdate() on self and on NavigationController Setting prefersStatusBarHidden: Bool to true Also tried UIApplication.shared.setStatusBarHidden(true, with: