Skip to content

Instantly share code, notes, and snippets.

@gonzalezreal
Created October 24, 2012 06:41
Show Gist options
  • Save gonzalezreal/3944419 to your computer and use it in GitHub Desktop.
Save gonzalezreal/3944419 to your computer and use it in GitHub Desktop.
NSFetchRequest *fetchRequest = [NSFetchRequest fetchRequestWithEntityName:@"TGRTweet"];
[fetchRequest setFetchBatchSize:25];
NSSortDescriptor *sortDescriptor = [NSSortDescriptor sortDescriptorWithKey:@"identifier"
ascending:NO];
[fetchRequest setSortDescriptors:@[sortDescriptor]];
NSArray *tweets = [self.managedObjectContext executeFetchRequest:fetchRequest error:NULL];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment