I have a custom UITabelViewCell
class that also implements UITextFieldDelegate
I also implement textFieldDidEndEditing
so that once a field is done being edited I get a call back so that I can store the value that was typed in back in to the data array that loads the table
Seems like I have to do this or the data array never gets the type in values.
I edit various rows and when I click to the next row i get the textFieldDidEndEditing
for the previous cell as expected. So far so good.
Now the problem. In the last cell I edit the cursor is still in the UITextField
. I click a button to 'evaluate' the list of items in the table. Clicking the button to 'evaluate' the table causes its routine to kick off immediately. HOWEVER, the 'evaluate' finishes BEFORE get the final textFieldDidEndEditing
for the field where my cursor was sitting.
That is, i do get the textFieldDidEndEditing
for the field where my cursor was sitting but I don't see that call back until too late. i have already 'evaluated; the array and then afterwards I stuff the last typed value in to the data array that load the table.
How do I get the 'evaluate' to wait on the last textFieldDidEndEditing
(IF there is one to come)? OR what do people typically do? Put in some kind of pause for my 'evaluate' so that there is time for the textFieldDidEndEditing
callback to happen first?
I have a separate question on a second but related problem here Know the row number inside custom UITableViewCell - new wrinkle