UISearchController change 'Cancel' button title
How we can change the title of cancel button in search controller? You can change the "Cancel" Button in search bar using this- for (UIView *view in searchBar.subviews) { for (id subview in view.subviews) { if ( [subview isKindOfClass:[UIButton class]] ) { [subview setEnabled:YES]; UIButton *cancelButton = (UIButton*)subview; [cancelButton setTitle:@"hi" forState:UIControlStateNormal]; NSLog(@"enableCancelButton"); return; } } } Burhanuddin Sunelwala The solution provided above could change with new iOS releases. Here is a better approach: [searchBar setValue:@"customString" forKey:@"