键盘收起的操作比较常见,使用 :
[self.view endEditing:YES];
监听屏幕事件中触发:
-(void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
[self.view endEditing:YES];
}
键盘会收起。
键盘收起的操作比较常见,使用 :
[self.view endEditing:YES];
监听屏幕事件中触发:
-(void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
[self.view endEditing:YES];
}
键盘会收起。