//1.这个方法可以让整个view取消第一响应者,从而让所有控件的键盘隐藏。
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
[self.view endEditing:YES];
}
//2.创建点击方法,从而实现键盘回收
-(void)TapAction:(UITapGestureRecognizer *)sender
{
[userNameTextField resignFirstResponder];
[passWordTextField resignFirstResponder];
}