removing keyboard from Screen without calling resignFirstResponder

后端 未结 4 1278
青春惊慌失措
青春惊慌失措 2021-01-18 01:57

I have a custom View (NotifyView) added on UIWindow with a dismiss button(which remove it from UIWindow). This view is added when a PU

4条回答
  •  醉梦人生
    2021-01-18 02:48

    Try this in delegate method...

    - (BOOL)textFieldShouldBeginEditing:(UITextField *)textField {
      [self.view endEditing:YES]; // added this in for case when keyboard was already on screen
      [self editStartDate:textField];
      return NO;
    }
    

提交回复
热议问题