Skip to content

Instantly share code, notes, and snippets.

@ariok
Created December 5, 2013 15: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 ariok/7807820 to your computer and use it in GitHub Desktop.
Save ariok/7807820 to your computer and use it in GitHub Desktop.
Add a new object in Core Data.
Entry *entry = [NSEntityDescription insertNewObjectForEntityForName:@"Entry" inManagedObjectContext:self.managedObjectContext];
entry.amount = [NSNumber numberWithFloat:[self.UI_amountTextField.text floatValue]];
[self.managedObjectContext save:&error];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment