iphone - checking which UITextField is triggering textFieldShouldBeginEditing call -


What is the best way to determine this UITextField turns on this method - (BOOL) textFieldShouldBeginEditing: (UITextField *) textField (or any of the other UITextFieldDelegate methods)? I have seen the first code like this:

  - TextFieldShouldBeginEditing (BOOL): (UITextField *) textField {if (textField == textFieldCode) {return yes; } no return; }  

But this only works if my class has an code as textFieldCode , and in this case I only have some code I am getting started by UITextField s and put them in a table, so I do not have their references in class.

I was thinking that I can store somewhere in the classroom using hash for each lesson, and then the method call textField hash for the desired hash But it seems like a hack.

You only have some fields, The tag can provide unique numbers in properties to enable recognition.


Comments