Created
May 16, 2011 08:13
-
-
Save rizumita/974078 to your computer and use it in GitHub Desktop.
Use UISearchBar & UISearchDisplayController
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UISearchBar *searchBar = [[[UISearchBar alloc] initWithFrame:CGRectZero] autorelease]; | |
[searchBar sizeToFit]; | |
self.tableView.tableHeaderView = searchBar; | |
[[[UISearchDisplayController alloc] initWithSearchBar:searchBar contentsController:self] autorelease]; | |
self.searchDisplayController.delegate = self; | |
self.searchDisplayController.searchResultsDataSource = self; | |
self.searchDisplayController.searchResultsDelegate = self; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment