Creating Objective-C Accessor Methods for a Managed Object
- Steps
In the project navigator, select the managed object model file that contains the entity for which you want to generate accessor methods.
In the Core Data model editor, in the detail area, select the attributes or relationships for which you want to generate accessor methods.
Choose Edit > Copy.
In the project navigator, select the header or implementation file into which you want to paste the code.
In the source editor, select the location where you want the code to appear.
Choose Edit > Paste <ItemType>.

Quickly create prototypes for custom accessor methods for your managed object class using the Core Data model editor.
Xcode generates the appropriate declaration or implementation code dependent on the properties you copy and the source file you select.
The Special Paste menu item reflects the context, so that <ItemType> is one of the following:
Attribute Interfaces
Attribute Implementations
Relationship Interfaces
Relationship Implementations
© 2012 Apple Inc. All Rights Reserved. (Last updated: 2012-01-09)