I wish to change the title of the cancel button in iOS. I have been using this previously:
- (void)searchDisplayControllerWillBeginSearch:(UISearchDisplayCon
Before search started, in UISearchBarDelagate or UISearchDisplayControllerDelegate do:
[self.searchDisplayController.searchBar.subviews enumerateObjectsUsingBlock:^(UIButton *subview, NSUInteger idx, BOOL *stop) {
if ([subview isKindOfClass:[UIButton class]]) {
[subview setTitle:@"OK" forState:UIControlStateNormal];
*stop = YES;
}
}];