摘要:
1.点击页面空白处隐藏键盘给viewController里面复写-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event方法,在这个方法里面,给先前获取了输入焦点的UITextField发送resignFirstResponder消息例如:-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ [self.baseCountTextField resignFirstResponder];}2.点击键盘上的return键隐藏键盘给UITextField. 阅读全文