Given a UITableViewController with a UISearchBar, how does one change the 'No Results' text that appears in the table view (after any characters are entered) 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 perform the search when the user selects the search button (not in response to changes to the search criteria). Thus, I still want the 'No Results' text to appear, but only if the user taps the 'Search' button and no results are returned from the server. I am currently 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];
}