Created
June 23, 2014 11:48
-
-
Save mikeabdullah/939faf318d1b8362fae4 to your computer and use it in GitHub Desktop.
Treating NSFetchedResultsSectionInfo.numberOfObjects as the truth
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
- (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