You can add a tag to each button that corresponds to its row, ex:
button.tag = indexPath.row;
Then give that button an action linked to a method which takes the button as a parameter, ex:
[button addTarget:self action:@selector(goToCommentView:) forControlEvents:UIControlEventTouchUpInside];
So that when a button is selected, and the method is called, you can get the object using that tag, ex:
- (void)goToCommentView:(UIButton*)sender {
PFObject *object = [self.objects objectAtIndexPath:sender.tag];
...
}
6
solved Parse iOS SDK: UIButton segue inside of PFTableViewCell [closed]