Creating Source Code to Implement a Custom Managed Object Class
- Steps
In the project navigator, select the managed object model.
In the Entities table, select the entity or entities for which you want to create an
NSManagedObjectsubclass.Choose Editor > Create NSManagedObject subclass.
In the dialog, select the folder where you want the new files to be created and the group where you want the new files to appear in the project navigator.
Click Create.

Create an NSManagedObject subclass for your entity to implement custom methods.
You must select an entity to enable the Create NSManagedObject subclass menu item. The screenshot shows the dialog that appears after you choose the menu item.
After you create the files, Xcode adds them to the current target. Xcode also updates the model with the new class names for the entities. Make sure you save the file before you build your project.
If you want to use a different name for a managed object class than its entity name, then you must change the name in several places:
Rename the class in the header and implementation files using the source editor
Change the class name in the utility area
Rename the header and implementation files in the project navigator
© 2012 Apple Inc. All Rights Reserved. (Last updated: 2012-01-09)