Is there a way in code to add some hidden information to a UITableViewCell?
Use Case:
- In an activity feed,
(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
is called and each cell has one activity. Each its own unique "activityId". - Each cell has some buttons in them (with unique tags) and, when pressed, the given activity is "liked"
- Each button has an IBOutlet, which would then call the model to then process the like
The code I have for the IBOutlet is:
- (IBAction)buttonUp:(UIButton *)sender {
UIButton *btn = (UIButton *) sender;
UITableViewCell *cell = (UITableViewCell *) [[btn superview] superview];
UIView *cellView = [cell.contentView viewWithTag: ..myUniqueButtonTag.. ];
NSLog(@"activityId is: %@", ...);
}