views:

27

answers:

2

I've subclassed an UITextField and inside that, I need to know if the text field is in editing mode or not. When editing mode changes from YES/NO I need to get notified somehow. I tried to overwrite the setter of the editing property, but that doesn't seem to work. Is there anything else?

+1  A: 

You can get that event in textField's delegate using textFieldDidBeginEditing: method.

Alternatively you can add observer to listen for UITextFieldTextDidBeginEditingNotification notification.

Vladimir
+1  A: 

We have a delegat method of textField that get calls autoatically when the textField enters into editing mode and while its exiting from editing mode

- (void)textFieldDidBeginEditing:(UITextField *)textField{
  EditingMode=YES;
}


- (void)textFieldDidEndEditing:(UITextField *)textField{
  EditingMode=NO;
}

hAPPY cODING...

Suriya
not good to be your own delegate....
openfrog
cant get what exactly do you want to say. This is not my own delegate. This is textFields Delegate methods.
Suriya