方法一:
方法二:
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
[self.view endEditing:YES];
}
方法二:
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
[self.userNameView.inputTextField resignFirstResponder];
[self.passwordView.inputTextField resignFirstResponder];
}