I\'m trying to perform a segue using a UIButton, which is located within in a custom UITableViewCell class called GFHomeCell.
The
Well, one answer would be to just go up a level in the view hierarchy:
- (void)commentButtonClick:(id)sender {
GFHomeCell * cell = (GFHomeCell *) [(UIButton*)sender superview];
if (cell && [cell Class] == [GFHomeCell class]) {
//do whatever with cell.postID
[self performSegueWithIdentifier:@"addCommentSegue" sender:sender];
}
}
Oh, I forget... you may have to go up two levels to get past the contentView property:
GFHomeCell * cell = (GFHomeCell *) [[(UIButton*)sender superview] superview];