[cell.btn addTarget:selfaction:@selector(didButtonClick:event:)forControlEvents:UIControlEventTouchUpInside];
- (void)didButtonClick:(UIButton *)senderevent:(id)event{
NSSet*touches=[event allTouches];
UITouch*touch=[touches anyObject];
CGPoint cureentTouchPosition=[touch locationInView:self.tableView];
//得到indexPath
NSIndexPath *indexPath=[self.tableView indexPathForRowAtPoint:cureentTouchPosition];
}
网友评论