如何得到自定义UITableViewCell中的按钮所在的cell

-(IBAction)button:(id)sender{  
UITableViewCell* buttonCell = (UITableViewCell*)[sender superview];
NSUInteger path = [[tableView indexPathForCell:buttonCell]row];

//如果有分组的话

NSUInteger section = [path section];//找到按钮所在的分组
NSUInteger row = [path row];//找到行

}
原文地址:https://www.cnblogs.com/MJP334414/p/5029954.html