UITextFieldTextDidChangeNotification doesn't get called on ios6 ipad3

后端 未结 5 1536
天命终不由人
天命终不由人 2021-02-14 09:29

have the following:

// watch the fields
[[NSNotificationCenter defaultCenter]  addObserver:self
                                          selector:@selec         


        
5条回答
  •  梦谈多话
    2021-02-14 09:38

    My use case was somewhat special, I was creating HH:MM:SS duration UITextField with characters entered from the back, therefore trapping characters in - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string and then returning return (NO); to forbid auto-update of UITextField... pre-iOS6, it called the notification, post-iOS6, I'm simply calling [[NSNotificationCenter defaultCenter] postNotificationName:UITextFieldTextDidChangeNotification object:self.textField]; just before the return statement.

提交回复
热议问题