Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/119.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios InsertRowsAtIndexPaths,在[\u mainTableView endUpdates]处中断,但如果删除BeginUpdate和endUpdates,将在SDAutoLayout中中断_Ios_Insert_Tableview - Fatal编程技术网

Ios InsertRowsAtIndexPaths,在[\u mainTableView endUpdates]处中断,但如果删除BeginUpdate和endUpdates,将在SDAutoLayout中中断

Ios InsertRowsAtIndexPaths,在[\u mainTableView endUpdates]处中断,但如果删除BeginUpdate和endUpdates,将在SDAutoLayout中中断,ios,insert,tableview,Ios,Insert,Tableview,[UIView animateWithDuration:0.2f动画:^{ NSMutableArray *indexPaths = [[NSMutableArray alloc] init] ; [_dataArray addObject:@"loading"]; NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0]; [indexPaths addObjec

[UIView animateWithDuration:0.2f动画:^{

    NSMutableArray *indexPaths = [[NSMutableArray alloc] init] ;
    [_dataArray addObject:@"loading"];
    NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0];
    [indexPaths addObject: indexPath];
    [_mainTableView beginUpdates];
    [_mainTableView insertRowsAtIndexPaths:indexPaths withRowAnimation:UITableViewRowAnimationNone];
    [_mainTableView endUpdates];
    
} completion:^(BOOL finished) {
  //  [_mainTableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:_dataArray.count - 1 inSection:0] atScrollPosition:UITableViewScrollPositionMiddle animated:YES];
}];
pragma标记-UITableViewDelegate,UITableViewDataSource
将打断sdautolayout:UITableView+SDAutoTableViewCellHeight.h-(void)sd_InsertRowsAndExpaths:(NSArray*)带RowAnimation的indexPaths:(UITableViewRowAnimation)animation{[self.cellAutoHeightManager insertNewDataAtIndexPaths:indexPaths];[self-sd_insertRowsAtIndexPaths:indexPaths with row animation:animation];}将在sdautolayout:UITableView+SDAutoTableViewCellHeight.h-(void)sd_insertRowsAtIndexPaths:(NSArray*)indexPaths with row animation:(uitableviewanimation)动画{[self.cellAutoHeightManager InsertNewDataAtIndexPath:IndexPath];[self-sd_insertRowsAtIndexPaths:IndexPath with RowAnimation:animation];}
-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return 1;
 }

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:
 (NSInteger)section
 {
  return _dataArray.count;
 }