Skip to content

Instantly share code, notes, and snippets.

@mikeabdullah
Created June 23, 2014 11:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikeabdullah/939faf318d1b8362fae4 to your computer and use it in GitHub Desktop.
Save mikeabdullah/939faf318d1b8362fae4 to your computer and use it in GitHub Desktop.
Treating NSFetchedResultsSectionInfo.numberOfObjects as the truth
- (void)trueObjectsInSection:(id <NSFetchedResultsSectionInfo>)section {
NSArray *objects = section.objects;
NSUInteger number = section.numberOfObjects;
if (number > objects.count) {
objects = [objects subArrayWithRange:NSMakeRange(0,number)];
}
return objects;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment