I have a UITableView with 5 UITableViewCells. Each cell contains a UIButton which is set up as follows:
UITableView
UITableViewCells
UIButton
- (UITableView
I would use the tag property like you said, setting the tag like so:
[button setTag:indexPath.row];
then getting the tag inside of the buttonPressedAction like so:
((UIButton *)sender).tag
Or
UIButton *button = (UIButton *)sender; button.tag;