Textfield being dequeued before textFieldDidEndEditing is called?

Posted by Tony on Stack Overflow See other posts from Stack Overflow or by Tony
Published on 2010-04-26T23:51:39Z Indexed on 2010/04/26 23:53 UTC
Read the original article Hit count: 209

Filed under:
|

I am using a uitableview with a bunch of dynamically created custom cells each with a label and textfield similar to the settings app on the phone. Problem occurs when i have a lot of textfields say 20, the user selects the first textfield, changes its value then scrolls to the end of the table and selects the last textfield to edit. I get a EXEC_BAD_ACCESS in the textFieldDidEndEditing method because i think the textfield value is nil?? I think this might be happending because the 1st textfield that was being edited is being dequeued when the table is scrolled. Everything works fine if you select textfields that are next to each other.

Any ideas how to fix this?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about objective-c