-(void)btnClick:(UIButton *)button{ UITableViewCell *cell = (UITableViewCell *)[[button superview] superview]; // 获取cell的indexPath NSIndexPath *indexPath = [self.tableView indexPathForCell:cell]; NSLog(@"点击的是第%ld行按钮",indexPath.row); }