Created
March 22, 2014 15:28
-
-
Save ryanfitz/9708984 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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