如何得到自定义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];//找到行

}
posted @ 2015-12-08 18:15  蓝鹰ios  阅读(177)  评论(0编辑  收藏  举报