[self.view endEditing:YES];//定义两个文本框
UITextField *textName;
UITextField *textSummary;
//点击return 按钮 去掉
-(BOOL)textFieldShouldReturn:(UITextField *)textField
{
[textField resignFirstResponder];
return
YES;
}
//点击屏幕空白处去掉键盘
- (
void
)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)
event
{
//[self.textName resignFirstResponder];
//[self.textSummary resignFirstResponder];
}
如果觉得《iOS点击空白处和和return键 回收键盘 隐藏键盘》对你有帮助,请点赞、收藏,并留下你的观点哦!