UITable row 넣기

|

[table beginUpdates];

NSIndexPath *indexPath;

for(int i=0; i < [rows count]; i++){

indexPath = [NSIndexPath indexPathForRow:i inSection:0];

[table insertRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationTop];

}

[table endUpdates];

[table scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:[rows count] inSection:0] atScrollPosition:UITableViewScrollPositionTop animated:NO];



또는


NSMutableArray *rowsToAdd = [[NSMutableArray alloc] init];

for (int i = 0; i < [rows count]; i++) {

[rowsToAdd addObject:[NSIndexPath indexPathForRow:i inSection:0]];

}


[table beginUpdates];

[table insertRowsAtIndexPaths:rowsToAdd withRowAnimation:UITableViewRowAnimationTop];

[table endUpdates];

[table scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:[rows count] inSection:0] atScrollPosition:UITableViewScrollPositionTop animated:NO];

And