Assertion failure in -[UITableView _endCellAnimationsWithContext:]

前端 未结 12 1586
走了就别回头了
走了就别回头了 2020-12-08 03:41

Hopefully this will be a quick fix. I have been trying to figure out the error that i keep getting. The error is listed below and the appdelagate is below that.

An

12条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-08 04:28

    I put each section elements in separated arrays. Then put them into another array( arrayWithArray). My solution here for this problem:

    [quarantineMessages removeObject : message];
    [_tableView beginUpdates];
    if([[arrayWithArray objectAtIndex: indPath.section] count]  > 1)
    {
        [_tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indPath] withRowAnimation:UITableViewRowAnimationBottom];
    }
    else
    {
        [_tableView deleteSections:[NSIndexSet indexSetWithIndex:indPath.section]
                  withRowAnimation:UITableViewRowAnimationFade];
    }
    [_tableView endUpdates];
    

提交回复
热议问题