Tutorial by Examples

This example uses a search controller to filter the data inside a table view controller. The search bar is placed inside the navigation bar that the table view is embedded into. Embed a UITableViewController into a UINavigationController to get the UINavigationItem (which contains the navigation ...
This example uses a search controller to filter the cells in a table view controller. The search bar is placed inside the header view of the table view. The table view content is offset with the same height as the search bar so that the search bar is hidden at first. Upon scrolling up past the top e...
First, make your class comply with the UISearchResultsUpdating protocol. class MyTableViewController: UITableViewController, UISearchResultsUpdating {} Add the search controller property: class MyTableViewController: UTableViewController, UISearchResultsUpdating { let searchController = UI...
Delegate: UISearchBarDelegate, UISearchControllerDelegate, UISearchBarDelegate @property (strong, nonatomic) UISearchController *searchController; - (void)searchBarConfiguration { self.searchController = [[UISearchController alloc] initWithSearchResultsController:nil]; self.searchC...

Page 1 of 1