I wish to change the title of the cancel button in iOS. I have been using this previously:
- (void)searchDisplayControllerWillBeginSearch:(UISearchDisplayCon
in order to make it work on iOS7, you have to search in the subview of search bar:
//iOS 7 hack
searchBar.showsCancelButton = YES;
UIView* view=searchBar.subviews[0];
for (UIView *subView in view.subviews) {
if ([subView isKindOfClass:[UIButton class]]) {
UIButton *cancelButton = (UIButton*)subView;
[cancelButton setTitle:@"Anuluj" forState:UIControlStateNormal];
}
}