You can do it:
- (void)searchBarCancelButtonClicked:(UISearchBar *)searchBar { [self enableCancelButton]; } - (void)enableCancelButton { for (UIView *view in _seachBar.subviews) { if ([view isKindOfClass:[UIButton class]]) { [(UIButton *)view setEnabled:YES]; } } }
BUT , this is a pretty hacky method, and I'm pretty sure that it generally frowned on Apple and could potentially lead to a rejection of the application. To my knowledge, there seems to be no other way to do what you are trying to do.
source share