Skip to content

Instantly share code, notes, and snippets.

@matteom
Created November 19, 2013 17:13
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 matteom/7548845 to your computer and use it in GitHub Desktop.
Save matteom/7548845 to your computer and use it in GitHub Desktop.
Creating new leads in Core Data
@implementation PCLead
@dynamic name;
@dynamic surname;
@dynamic company;
+ (instancetype)insertLeadInManagedObjectContext:(NSManagedObjectContext *)managedObjectContext {
return [NSEntityDescription insertNewObjectForEntityForName:self.entityName inManagedObjectContext:managedObjectContext];
}
+ (NSString *)entityName {
return @"Lead";
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment