I will like to update a particular label in all the table cells (using an array) whenever the user taps the return button on the keyboard.
I have already created a setLabel(NSString *) method in the table cell class. However, I can’t seem to call this method from the textFieldShouldReturn method (when the user taps the return key).
I also tried to call the cellForRowAtIndexPath method in the textFieldShould Return method using the following lines:
For LOOP
cell1 = [[self tableView] cellForRowAtIndexPath: counter]
However, the application always hangs because an exception is thrown.
I will like to update a particular label in all the table cells (using an array) whenever the user taps the return button on the keyboard.
I have already created a setLabel(NSString *) method in the table cell class. However, I can’t seem to call this method from the textFieldShouldReturn method (when the user taps the return key).
I also tried to call the cellForRowAtIndexPath method in the textFieldShould Return method using the following lines:
For LOOP
cell1 = [[self tableView] cellForRowAtIndexPath: counter]
However, the application always hangs because an exception is thrown.
Will appreciate any help, thank you =)
[tableView reloadData];
that will call cellforrow and any others that the tableview uses to set its cells/rows/sections
[tableView reloadData];
that will call cellforrow and any others that the tableview uses to set its cells/rows/sections
Hi,
Thank you for your quick reply.
What I will like to do is to update a particular label in all the table cells using a new array of data. If I am to reload the data, how do I tell the cell that I have a new set of data for the label?
*Hope I am making sense here, it is all quite new to me, thank you again =)
What I will like to do is to update a particular label in all the table cells using a new array of data. If I am to reload the data, how do I tell the cell that I have a new set of data for the label?
*Hope I am making sense here, it is all quite new to me, thank you again =)
Well are u wanting to switch to a different array or just change the value in the array its already using?