How do I set the UISearchController's searchBar to a view that isn't the tableHeaderView or navigationItem.titleview?
问题 I'm trying to keep the search bar in view as the table scrolls. At the moment I'm placing it as the header in a tableview, and it works as it should, but of course the search bar scrolls off screen as you go down the table. I thought I could do this simply modifying this code sample: How do I use UISearchController in iOS 8 where the UISearchBar is in my navigation bar and has scope buttons? searchController = UISearchController(searchResultsController: nil) searchController