有时在尝试从 UITableView 中删除一行时出现此错误:
-[UITableView _endCellAnimationsWithContext:] 中的断言失败
有时它会删除没有问题的行。
这是我的代码:
- (void) tableView:(UITableView *)tableView
commitEditingStyle:(UITableViewCellEditingStyle)editingStyle 
 forRowAtIndexPath:(NSIndexPath *)indexPath
{
    if (editingStyle == UITableViewCellEditingStyleDelete)
    {
     [[self displayedObjects] removeObjectAtIndex:[indexPath row]];
     // Animate deletion
     NSArray *indexPaths = [NSArray arrayWithObject:indexPath];
     [[self tableView] deleteRowsAtIndexPaths:indexPaths withRowAnimation:UITableViewRowAnimationFade];
    }
}