hello,
what is the correct way of initilizing a class inheriting from NSManagedObject?
give me some code for it..
hello,
There are two way inheriting from NSManagedObject!!!
Car *car = [[Car alloc] initWithEntity:[NSEntityDescription entityForName:@"Car" inManagedObjectContext:self.managedObjectContext] insertIntoManagedObjectContext:self.managedObjectContext];
or
Car *car = [NSEntityDescription insertEntityWithName@"Car" inManagedObjectContext
:self.managedObjectContext]
Ads