Instance Method

initWithContext:

Initializes a managed object and inserts it into the specified managed object context.

Declaration

- (instancetype)initWithContext:(NSManagedObjectContext *)moc;

Return Value

An initialized instance of the appropriate subclass.

Discussion

This method is only legal to call on subclasses of NSManagedObject that represent a single entity in the model.

See Also

Initializing a Managed Object

initWithEntity:insertIntoManagedObjectContext:

Initializes a managed object and inserts it into the specified managed object context.