I have a UITableView with 6 UITextFields that are tagged in the cellForRowAtIndexPath: method (0 through 5). I also attach a datePicker view to the inputView for fields 5 and 6 in the textFieldShouldBeginEditing: method based on the tags (4 and 5).
When data is entered into field 2, and then field 6 (date field) is tapped for input, the datePicker view slides up and field 2 is obstructed. When the input has been completed (or if you scroll up to bring field 2 into view, I can see that its contents are erased/emptied/deleted.
I am baffled by why this happens. Any thoughts?
This happens because the cell has been deallocated to save memory. To combat this you need to store the contents of the text field in a variable. Then when the cell is recreated load the saved contents. If you need more details let me know…