标签:
@property (weak, nonatomic) IBOutlet UISearchBar *searchBar;
- (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; [self performSelector:@selector(setCorrectFocus) withObject:NULL afterDelay:0.8]; }
-(void) setCorrectFocus { [self.searchBar becomeFirstResponder]; }
标签:
原文地址:http://www.cnblogs.com/codemakerhj/p/5779191.html