UIScrollView 拖拽滑动时收起键盘
作者:互联网
UIScrollView 拖拽滑动时收起键盘
// 方法1
- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView {
[[[UIApplication sharedApplication] keyWindow] endEditing:YES];
}
// 方法2
self.tableView.keyboardDismissMode = UIScrollViewKeyboardDismissModeOnDrag;
标签:keyboardDismissMode,键盘,UIScrollView,收起,滑动,拖拽 来源: https://blog.csdn.net/pureszgd/article/details/122763027