iOS ViewController点击空白处收起键盘

点击ViewController空白处时收起键盘,能够经过系统的touchesBegan方法实现,具体以下:objective-c Objective-C 版swift - (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event { [self.view endEditing:YES]; } 1 2 3 1
相关文章
相关标签/搜索