1 -(BOOL)textFieldShouldReturn:(UITextField *)textField
2 {
3 [textField resignFirstResponder];
4 return NO;
5 }
6
7 - (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
8 {
9 [self.gMonthTextField resignFirstResponder];
10 }
11
12 - (void)touchesEnded:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
13 {
14 [self.gMonthTextField resignFirstResponder];
15 [[[UIApplication sharedApplication] keyWindow] endEditing:YES];
16 [self.view endEditing:YES];
17 [[UIApplication sharedApplication] sendAction:@selector(resignFirstResponder) to:nil from:nil forEvent:nil];
18 }