-(void)scrollViewDidScroll:(UIScrollView *)scrollView{
[[UIApplication sharedApplication]sendAction:@selector(resignFirstResponder) to:nil from:nil forEvent:nil];
}
-(BOOL)resignFirstResponder{
[_searchBar resignFirstResponder];//使你想做的控件失去第一响应,一般情况就是搜索
return YES;
}
网友评论