I have a series of table view controllers that each connect to a common detail view controller. In the detail view controller, I include a viewWillAppear function that issues
self.navigationController?.setNavigationBarHidden(true, animated: animated)
This gives me the whole page for my detail view, except for a tab bar controller at the bottom that permits the user to return to one of the table view controllers. I issue the same command with false instead of true in viewWillDisappear to ensure that the navigationBar is visible when I return to the table views.
This works fine. All of the table view controllers have a navigationBar that includes a searchBar. But one of the table view controllers also has a scope bar that appears when the search bar is clicked. The search bar moves to the top of the screen and the scope bar appears beneath. I am following the instructions in a tutorial I found online, and it seems to work fine, except that there must be something I am missing involving a reset as part of the segue. The reason I say that is that when I connect from a table for a selected row chosen with the scope bar shown, the detail view screen that appears ignores the setNavigationBarHidden request in viewWIllAppear and I get some blank screen at the top. A lot of blank screen.
I can fix this by adding the setNavigationBarHidden request in viewDidAppear, but that's a bit clunky as the blank navigation bar appears before disappearing. I am assuming that the demise of the scope bar is associated with a viewWillDisappear or some such that overrides the viewWillAppear on the next screen, but I cannot figure out where and would appreciate suggestions. This is my first question to the forum, and I apologize in advance for any naivete.