Created
June 10, 2013 17:17
-
-
Save aliHafizji/5750549 to your computer and use it in GitHub Desktop.
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
//manually add a search bar | |
UISearchBar *searchBar = [[UISearchBar alloc] initWithFrame:CGRectMake(0, 3, 320, 44)]; | |
searchBar.delegate = self; | |
[searchBar setPlaceholder:NSLocalizedString(@"SearchNearbyPlaces", nil)]; | |
UISearchDisplayController *searchDisplayController = [[UISearchDisplayController alloc] initWithSearchBar:searchBar contentsController:self.navigationController]; | |
searchDisplayController.searchResultsDataSource = self; | |
searchDisplayController.searchResultsDelegate = self; | |
searchDisplayController.delegate = self; | |
self.tableView.tableHeaderView = searchBar; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment