Problem:
I have a UITableViewController built into the UINavigationController . Clicking on a cell in a table view switches to another table view controller. In the specified table view controller, I would like the navigation bar to be invisible while preserving the elements of the tab bar, so I added the following to its viewDidLoad() :
self.navigationController?.navigationBar.setBackgroundImage(UIImage(), forBarMetrics: .default) self.navigationController?.navigationBar.shadowImage = UIImage() self.navigationController?.navigationBar.isTranslucent = true self.navigationController?.navigationBar.tintColor = .black
For the first UITableViewController, I would like the navigation bar to be normal, so in its viewDidAppear() I did the following:
self.navigationController?.navigationBar.isTranslucent = false
Everything works fine except during the transition (which I do using performSegueWithIdentifier ) the navigation bar on the first view controller disappears in the dark, which, frankly, looks ugly. Is there any way to prevent / fix this?
Screenshot: 
cyril source share