In xcode 9, when I put the search bar in my moves, the rest of the user interface is automatically reduced. When I try to remove the search bar from the view, I get black space instead of a fixed user interface. Used string: self.navigationItem.searchController = nil. I tried many things, but I donβt know how to fix the user interface after deleting the search bar. Only when I go to another view controller and back will the user interface come back again without a search bar. What am I missing here?
the code:
@IBAction func searchIconPressed(_ sender: UIBarButtonItem) { //ios 11 if
}
ios11 xcode9
Frank van der Meulen
source share