Hi All, I've had a hunt in the forums and couldn't find anything related to this, apologies if I've missed it.
I have a Master/Detail app and I'm implementing a UISearchController for the master tableview. I've defined the searchcontroller with this property.
let searchController = UISearchController(searchResultsController: nil)I've configured the searchcontroller with this in viewDidLoad. This is the only configuring I'm doing...
// Configure the Search functionality
searchController.searchResultsUpdater = self
searchController.obscuresBackgroundDuringPresentation = false
searchController.searchBar.placeholder = "Search Items"
navigationItem.searchController = searchController
definesPresentationContext = trueAll well and good and I have the searching working great.
Problem is when I select an item and go to the item (the detail side is a tabviewcontroller) and then back to the master view the Search Controller is no longer visible.
When I load the app the navigation bar contains the searchcontroller as well as a couple of buttons. When I come back to the master view from the detail side of things - the navigation bar has shrink down to just containing the buttons. There is a slight pause (0.5 seconds) then the tableview moves down the view by about the distance required to hold the searchcontroller.
I've checked and the searchcontroller remains initialised through the above so it's there(!) - just not being displayed.
On the detail side, the tabbarcontroller is embedded in a navigationcontroller and all the tabs are, again, embedded in navigationcontrollers. I've been at this for hours and I just can't see what I've done to cause the searchcontroller to dissapear.
Anyone any ideas. (hope this makes some kind of sense!)
Pat