Tuesday 15 September 2015

ios - how to access these text fields within a UITableViewCell? -


I have a screen and a UITableView for displaying information of some companies. In the field of each company, 1 address text field And the UI has an arrow icon. Click the arrow icon, the contacts of this company will be shown. The data includes names and telephones. These contacts are also UITableViewCells, which are related to the same section. For the second company, there is another section.

In each section, under these contacts, there is an "edit / save" button that users can click on and edit or save contact names and telephone

My questions

I know that the Edit / Save button is clicked in the AD method (ID) by using the sender, but how can I read the values ​​of updated contacts? Name / telephone in those 2 text areas above the button?

Thank you in advance!

The entire table view looks like this,

company1

address [arrow button]

contact name telephone contact / Save]

company2

address [arrow button] ...

Whenever a text is changed, record it immediately (like a dictionary, in a temporary store, using the textField: ChangeCharactersInRange: ReplacementString: ). You do it immediately so that you do not have to worry about completing the edits at the end and if the table view is scrolled then nothing will be lost.

If the table view is scrolled and the cells are redone,

Now, when the Save button is pressed, you can use the temporary store of data .

No comments:

Post a Comment