How can I change strings of \"Cancel\" button, \"No Results\" label in UISearchBar of UISearchDisplayController?
Thank you ChangUZ for finding a way. Now, for improvement, a timer is not needed to alter the "No Results" label.
- (BOOL)searchDisplayController:(UISearchDisplayController *)controller shouldReloadTableForSearchString:(NSString *)searchString
{
dispatch_async(dispatch_get_main_queue(), ^(void) {
for (UIView *v in controller.searchResultsTableView.subviews) {
if ([v isKindOfClass:[UILabel self]]) {
((UILabel *)v).text = @"_____";
break;
}
}
});
return YES;
}