So I have a standard setup for setting up a search view in my tvOS app.
let storyboard = UIStoryboard(name: "Main", bundle: nil)
guard let resultsController = storyboard.instantiateViewControllerWithIdentifier(SearchResultsViewController.storyboardIdentifier) as! SearchResultsViewController
let searchController = UISearchController(searchResultsController: resultsController)
searchController.searchResultsUpdater = resultsController
searchController.hidesNavigationBarDuringPresentation = false
searchController.searchBar.placeholder = NSLocalizedString("Enter keyword (e.g. iceland)", comment: "")
let searchContainer = CustomUISearchContainerViewController(searchController: searchController)
And what this is when pushed onto the navigation stack is a view that has the search bar on top and the results below like this
So whenever the results are large and I have to scroll the keyboard collapses and expands again whenever I scroll back up and swipe past the top most results. Is there any way to prevent this behavior? I just want it to stay open all the time. I was thinking of maybe subclassing UISearchController
, but I wasn't sure what in there to even replace