Я достиг этого с помощью следующего:
@interface SearchViewController : UIViewController<UISearchBarDelegate, UISearchDisplayDelegate> {
BOOL shouldBeginEditing;
}
@end
@implementation SearchViewController
-(void)searchBar:(UISearchBar *)bar selectedScopeButtonIndexDidChange:(NSInteger)selectedScope
{
shouldBeginEditing = NO;
}
-(BOOL)searchBarShouldBeginEditing:(UISearchBar *)bar
{
if (shouldBeginEditing)
{
return YES;
}
else
{
shouldBeginEditing = YES;
return NO;
}
}
@end