Skip to content

Instantly share code, notes, and snippets.

@ryanfitz
Created March 22, 2014 15:28
Show Gist options
  • Save ryanfitz/9708984 to your computer and use it in GitHub Desktop.
Save ryanfitz/9708984 to your computer and use it in GitHub Desktop.
int resultsSize = [self.dataController.products count]; //data is the previous array of data
[self.dataController.products addObjectsFromArray:products];
[self.productsView performBatchUpdates:^{
NSMutableArray *arrayWithIndexPaths = [NSMutableArray array];
for (int i = resultsSize; i < resultsSize + products.count; i++) {
[arrayWithIndexPaths addObject:[NSIndexPath indexPathForRow:i inSection:0]];
}
[self.productsView insertItemsAtIndexPaths:arrayWithIndexPaths];
}
completion:nil];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment