1
votes

I have large navBar with search bar inside on VC1. When I show VC2 from VC1, I have ui search bar trouble (see screenshot). In VC2 viewWillAppear method I call navigationController?.setNavigationBarHidden(true, animated: true). And I call navigationController?.setNavigationBarHidden(false, animated: true) in viewWillAppear of VC2.

enter image description here

1
Hide the search controller before pushing VC2. - El Tomato

1 Answers

0
votes

you can simply hide the search controller right before pushing to VC2

self.searchController.searchBar.isHidden = true

or

self.searchBar.isHidden = true