ios8 - Adding a UISearchController to a Non-Table View -


There is a problem using the new UISearchController in IOS8. I've found that every instance of the search bar is used by UITableView Header View in the form of What do you do when you need to display the search bar elsewhere? For example, keeping the searchbar out of the table to prevent the scrollbar from scrolling? What about using it with something like UICallview?

Am I missing something here? It does not seem that it should be complicated.

in the titleView of the UISActbarbar navigation bar, You can prevent it from scrolling when the tableview is scrolled.

  self.searchController.hidesNavigationBarDuringPresentation = NO; Self.searchController.searchBar.searchBarStyle = UISearchBarStyleMinimal; // Include the search bar within the navigation bar Self.navigationItem.titleView = self.searchController.searchBar; Self.definesPresentationContext = Yes;   

UISearchController depend on searchResultsController that should be the view controller that manages the search results, make sure that UISearchBar < In the / code> when UISearchController is active, the controller is pointed to view by the searchResultsController property update based on the text. In this way you can use UISearchController with table view or archive view.

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -