I am attempting to create “add new address” and “add new phone umber” functionality similar to the contact app for iOS.
I am specifically interested in this process.

- Have and “add new item” field when there are no records for an
entry. - When the user clicks the “add new item” row that row disappears and
a multi-row multi-field input area appears (Not address information
but a similar style). - Once the users adds any information in any of the fields a new “add
new item” appears.
and the add new phone number process

- The user clicks on the phone number field.
- The users adds a number, once the first number is entered the iPhone phone field appears.
- If the user adds one number
- then deletes it
- and then moves to the next field the iPhone field disappears.
I am comfortable managing data and inserting and deleting rows. Where I am having difficulty is what delegates to listen to in the uitextfield, what to look for, and then when to update the uitableview.
Any help would be appreciated.
Thanks,
James
First, you can give your textFields tags to find out, which row is edited currently. In the delegate method just check
sender.tagto determine the row.The UITextFieldDelegate gives you all information you need:
The editing in row xy started, user touched the textfield, textfield is first responder, cursor is blinking now. Time to switch to edit-mode and to add the “Add another adress” row.
User changed the contents of the textfield.
Use
[textField.text stringByReplacingCharactersInRange: range withString: string]to get the resulting string. Get length from that string. Iflength > 0, add another row.Textfield did resign its first responder state. User left the textfield. Check row and contents of the textField – if it was an optional row and the text is empty (and it is the last row in the section), remove the row.
I hope that helped?