I have a view controller that hides both navigationBar and statusBar. When the viewController pushes to a new viewController, where I want to show both navigationBar and statusBar, the result is like this:
In viewDidLoad, I do this:
self.navigationController?.navigationBar.barStyle = .default
self.navigationController?.setNavigationBarHidden(false, animated: false)
UIApplication.shared.setStatusBarHidden(false, with: UIStatusBarAnimation.none)
If I tap on one of the tab items in my application, and then return back to the same tab that shows the view controller, the navigationBar is shown correctly without the black bar:
Any idea how I can show the navigationBar correctly?
Here's how I do it:
Navigation Bar (set this in every view controller)
Status Bar (set this in every view controller)
Obviously, set true/false as needed. By doing this in every view controller you are insuring things behave the way you want (true == hide).