I wish to change the title of the cancel button in iOS. I have been using this previously:
- (void)searchDisplayControllerWillBeginSearch:(UISearchDisplayCon
Refer to @Salih's solution above, I used this code and work perfect! Just call the method setupAppearance in AppDelegate.m when app launching.
- (void)setupAppearance
{
id appearance = nil;
if (IOS9_OR_LATER) {
appearance = [UIBarButtonItem appearanceWhenContainedInInstancesOfClasses:@[[UISearchBar class]]];
} else {
appearance = [UIBarButtonItem appearanceWhenContainedIn:[UISearchBar class], nil];
}
[appearance setTitle:@"CANCEL"];
}