删除自定义cell 遇到的坑

来源:互联网 发布:窥一隅而知全貌的意思 编辑:程序博客网 时间:2024/06/06 17:28

PlayingVC *playingVC = (PlayingVC *)self.viewController;    // 从列表中删除    KSPlayCommentVoiceCell * cell =(KSPlayCommentVoiceCell *)[[self.deleteCommentButton superview] superview];    NSIndexPath *indexPath = [playingVC.commentView.tableView  indexPathForCell:cell];    [playingVC.commentView.dataArr removeObjectAtIndex:indexPath.row];    [playingVC.commentView.tableView beginUpdates];    [playingVC.commentView.tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade];    [playingVC.commentView.tableView endUpdates];


0 0
原创粉丝点击