Uitableview NSInternalInconsistencyException:删除行然后更新表时,tableView中的节更新无效

Uitableview NSInternalInconsistencyException:删除行然后更新表时,tableView中的节更新无效,uitableview,Uitableview,这是我在删除第1节中的数据后更新tableview并设置其动画的方法,也是我尝试更新应用程序时遇到的问题- (void)onBusinessSuccess:(id)dataObj{ if([[u isbuisnscall IsequalString:IS\u labor]) { 我只是添加bool变量并检查条件是否正确 如果(!\u重新加载&!\u为默认值){ self.objLabTestVO=(LabTestVO*)dataObj; //添加新行 __块NSMutableArray*inse

这是我在删除第1节中的数据后更新tableview并设置其动画的方法,也是我尝试更新应用程序时遇到的问题-

(void)onBusinessSuccess:(id)dataObj{

if([[u isbuisnscall IsequalString:IS\u labor]) {


我只是添加bool变量并检查条件是否正确

如果(!\u重新加载&!\u为默认值){

self.objLabTestVO=(LabTestVO*)dataObj; //添加新行 __块NSMutableArray*insertArray=[[NSMutableArray alloc]initWithCapacity:10]; [arrNewLabTestDataSource enumerateObjectsUsingBlock:^(id obj,整数idx,布尔*停止){ [insertArray addObject:[NSIndexPath indexPathForRow:idx片段:0]]; }])

}

BusinessSingleton *currentBusinessSingleton = [BusinessSingleton sharedInstance];
[[currentBusinessSingleton arrVirtualNetworkCall] removeObjectAtIndex:[currentBusinessSingleton containsObjectAtIndex:[self objLabOrderBusiness]]];

if(!_reloading){
    self.objLabTestVO = (LabTestVO*)dataObj;
    //adding the new rows
    __block NSMutableArray *insertArray = [[NSMutableArray alloc]initWithCapacity:10];
    [arrNewLabTestDataSource enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
        [insertArray addObject:[NSIndexPath indexPathForRow:idx inSection:0]];
    }];

    __block NSMutableArray *insertArray1 = [[NSMutableArray alloc]initWithCapacity:10];
    [self.objLabTestVO.arrUnsignLab enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
        [insertArray1 addObject:[NSIndexPath indexPathForRow:idx inSection:1]];
    }];

    __block NSMutableArray *insertArray2 = [[NSMutableArray alloc]initWithCapacity:10];
    [self.objLabTestVO.arrSignLab enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
        [insertArray2 addObject:[NSIndexPath indexPathForRow:idx inSection:2]];
    }];

    [tableViewLeft beginUpdates];
    [tableViewLeft insertRowsAtIndexPaths:insertArray withRowAnimation:UITableViewRowAnimationTop];
    [tableViewLeft insertRowsAtIndexPaths:insertArray1 withRowAnimation:UITableViewRowAnimationTop];
    [tableViewLeft insertRowsAtIndexPaths:insertArray2 withRowAnimation:UITableViewRowAnimationTop];
    [tableViewLeft endUpdates];
    [tableViewLeft setContentInset:UIEdgeInsetsMake(1,0,0,0)];
    [tableViewLeft setContentInset:UIEdgeInsetsMake(0,0,0,0)];


}
__block NSMutableArray *insertArray1 = [[NSMutableArray alloc]initWithCapacity:10];
[self.objLabTestVO.arrUnsignLab enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
    [insertArray1 addObject:[NSIndexPath indexPathForRow:idx inSection:1]];
}];

__block NSMutableArray *insertArray2 = [[NSMutableArray alloc]initWithCapacity:10];
[self.objLabTestVO.arrSignLab enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
    [insertArray2 addObject:[NSIndexPath indexPathForRow:idx inSection:2]];
}];

[tableViewLeft beginUpdates];
[tableViewLeft insertRowsAtIndexPaths:insertArray withRowAnimation:UITableViewRowAnimationTop];
[tableViewLeft insertRowsAtIndexPaths:insertArray1 withRowAnimation:UITableViewRowAnimationTop];
[tableViewLeft insertRowsAtIndexPaths:insertArray2 withRowAnimation:UITableViewRowAnimationTop];
[tableViewLeft endUpdates];
[tableViewLeft setContentInset:UIEdgeInsetsMake(1,0,0,0)];
[tableViewLeft setContentInset:UIEdgeInsetsMake(0,0,0,0)];