通过button获取所在的tableViewCell

来源:互联网 发布:java 接口 调用接口 编辑:程序博客网 时间:2024/06/08 08:12
UIButton* button = (UIButton*) sender;UITableViewCell *cell = (UITableViewCell*)button.superview.superview;NSIndexPath *indexPath = [self.tableView indexPathForCell:cell];