[cell.myignore addTarget:self action:@selector(removeCell:) forControlEvents:UIControlEventTouchUpInside];
#pragma mark - 点击删除按钮删除Cell
- (void)removeCell:(UIButton *)btn{
NSArray *visibleCells=[self.myTableView visibleCells];
for (UITableViewCell *cell in visibleCells) {
if (cell.tag==btn.tag) {
[self.cellInfoArray removeObjectAtIndex:[cell tag]];
[self.myTableView reloadData];
break;
}
}
}
时间: 2024-10-14 03:52:42