xcode4.3 完成输入后 点击背景关闭键盘

-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ 
[self.view endEditing:YES];
}


把这个复制到视图对应的.m文件中,即可

原文地址:https://www.cnblogs.com/csshaw/p/3764392.html