how can i create an instance for NSmanagedObject Class which i am created using core data model. I have another class which is the subclass of NSObject. I want to create an object for NSManageObject Class. how can i do that. Is it like the normal way that we create the instance for NSobject class like
ClassB.m //ClassB is NSObject Class
ClassA *obj = [[ClassA alloc]init]; //ClassA is NSmanagedObject Class
or is there any way to do that???
i am not using this code(Apple Docs) for creating instance
NSManagedObject *newEmployee = [[NSManagedObject alloc]
initWithEntity:employeeEntity
insertIntoManagedObjectContext:context];
i would like to know, is there any way to create an object similar to the above code using restkit
Note: i am using Restkit for creating object instance and mapping.
Thanks
Using Restkit you can use the static method object on the class you want to create. In your example
would return you an instantiated object.
Just be sure to import the correct headers:
instead of