To help you provide more details.
- Is it a single cell or is it a prototype for several?
- Code in actionMore: selector.
- What are you trying to do this? Why does a button in a cell change label text?
If this cell is used more than once, the problem may be more efficient: it cannot highlight which cell is the target for the code. You may also have the same typo in the actionMore method, but we cannot solve this without being able to see all the interacting code.
If you can provide more details, someone can help. I will edit this answer if I can help you when I have more information.
- EDIT -
First, to get a cell, you can use:
UITableViewCell * cell = (UITableViewCell*)[[sender superview] superview];
Then you can access your cell label:
cell.label.text = @"Some Text Here";
Your next problem is to find out where the list your cell is in. To do this, use this code:
UITableView * table = (UITableView*)[[[sender superview] superview] superview]; NSIndexPath * indexPath = [table indexPathForCell: cell];
You can then use the switch statement or if-else statements to find which line was run.
RMDan source share