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 appearancetoNOin theinfo.plistfile
- Using setNeedsStatusBarAppearanceUpdate()onselfand onNavigationController
- Setting prefersStatusBarHidden: Booltotrue
- Also tried UIApplication.shared.setStatusBarHidden(true, with: UIStatusBarAnimation.none)
- Also extending NavigationController. seen here
Any help will be appreciated. Thanks.
 
     
    