Skip to content

Instantly share code, notes, and snippets.

@jarodl
Created July 21, 2010 16:32
Show Gist options
  • Save jarodl/484730 to your computer and use it in GitHub Desktop.
Save jarodl/484730 to your computer and use it in GitHub Desktop.
// Create a new instance of the entity managed by the fetched results controller.
NSManagedObjectContext *context = [self.fetchedResultsController managedObjectContext];
NSEntityDescription *entity = [[self.fetchedResultsController fetchRequest] entity];
Account *account = [NSEntityDescription insertNewObjectForEntityForName:[entity name]
inManagedObjectContext:context];
[account setValue:[userDict valueForKey:@"username"] forKey:@"username"];
[account setValue:[userDict valueForKey:@"password"] forKey:@"password"];
[account getAvatar];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment