ios隐藏键盘
1.点击页面空白处隐藏键盘 给viewController里面复写-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event方法,在这个方法里面,给先前获取了输入焦点的UITextField发送resignFirstResponder消息 例如: -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { [self.baseCountTextField resignFirstResponder]; } 2.点击键盘上的return键隐藏键盘 给UITextField绑定Did End on Exit事件处理函数,并在其中给UITextField发送resignFirstResponder 消息。 3.给整个页面设置一个大的UIControl类的控件 这种做法是将一个UIControl控件作为底子,然后在上面放其他控件,最后给作为底子的UIControl控件绑定touch up inside事件处理逻辑。 4.修改viewControll...