iOS开发点击cell上的按钮获取当前cell的索引
2018-09-10 本文已影响17人
lczalh
UIView *view = sender;
while (![view isKindOfClass:[UITableViewCell class]]) {
view = [view superview];
}
MeterReadingManageContentCell *myCell = (MeterReadingManageContentCell *)view;
NSIndexPath * indexPath = [self.tableView indexPathForCell:myCell];