[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];
}];
-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:
(NSInteger)section
{
return _dataArray.count;
}