Skip to content

Instantly share code, notes, and snippets.

View imrekel's full-sized avatar

Imre Kelényi imrekel

  • Bitrise
  • Budapest, Hungary
View GitHub Profile
@imrekel
imrekel / UNAppDelegate-fetch.m
Last active December 15, 2015 10:29
bme-ios - UberNotebook
NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init];
NSEntityDescription *entity = [NSEntityDescription entityForName:@"Note"
inManagedObjectContext:context];
[fetchRequest setEntity:entity];
NSArray *fetchedObjects = [context executeFetchRequest:fetchRequest error:&error];
for (NSManagedObject *note in fetchedObjects)
{
NSLog(@"Title: %@", [note valueForKey:@"title"]);
NSLog(@"Content: %@", [note valueForKey:@"content"]);
}