UITableView _endCellAnimationsWithContext崩溃

http://www.cocoachina.com/bbs/read.php?tid-315222.html

删除cell之前先把数据源也删除一条,直接删除cell会崩溃

下面是正确的姿势:

cell.deleteCellBlock = ^(NSIndexPath *deleteIdx){
        [weakSelf.pgcList removeObject:feed];
        [tableView deleteRowAtIndexPath:deleteIdx withRowAnimation:UITableViewRowAnimationAutomatic];
    };

posted on 2017-11-22 15:44  土匪7  阅读(248)  评论(0编辑  收藏  举报