Given the UITableViewController with the UISearchBar, how do you change the text "No results" that appears in the table view (after entering any characters) to something like "Search by name"? The reason is that the search in question is performed remotely (and has about a second delay), so I can only search when the user selects the search button (not in response to changes in the search criteria). Thus, I still want the text βNo Resultsβ to appear, but only if the user clicks the Search button and the results are not returned from the server. I have:
- (BOOL)searchDisplayController:(UISearchDisplayController *)controller shouldReloadTableForSearchScope:(NSInteger)searchOption { return NO; } - (BOOL)searchDisplayController:(UISearchDisplayController *)controller shouldReloadTableForSearchString:(NSString *)searchString { return NO; } - (void)searchBarSearchButtonClicked:(UISearchBar *)searchBar { self.results = [Projects findAllRemote]; [self.searchDisplayController.searchResultsTableView reloadData]; }
source share