Thanks for all you help guys, but i found the soloution i was looking for. so here it is
in your cellForRowAtIndexPath method
[[cell team1Button] addTarget:self
action:@selector(shield1Touched:)
forControlEvents:UIControlEventTouchUpInside];
[[cell team2Button] addTarget:self
action:@selector(shield2Touched:)
forControlEvents:UIControlEventTouchUpInside];
}
[[cell team1Button] setTag:[indexPath row]];
[[cell team2Button] setTag:[indexPath row]];
set the tag so , when you select the button within your custom cell, the app knows which row was selected.
so then on your button pressed method
- (IBAction)shield1Touched:(id)sender;{
WorldCupAppDelegate *appDelegate = [UIApplication sharedApplication].delegate;
int rowOfButton = [sender tag];
ScoreDetails *scoreDetail = [appDelegate.liveMatch objectAtIndex:rowOfButton];
so then you can perform all the actions you need depending on which button was touched on which cell
hope this helps someone else
source for information was here