Reputation: 9703
I'm trying to conform to the MVC paradigm
in my iOS app. My model consists of entities stored in coreData which I have set up using the xcdatamodel
file.
I want to add some custom methods to these entities in order to keep the Model part separate from the Controller.
In previous versions of Xcode the autogenerated managedObject
classes were added automatically to my project and I could add custom methods to these classes. Now I no longer see these auto genterated classes.
I have selected 'Class Definition' for the codegen.
Do I need to create an additional class for each entity to enable custom methods on those entities
? Or is there a better way to go about this.
Upvotes: 2
Views: 2060
Reputation: 19602
This is a rather new Xcode feature. Xcode generates the files for you and holds a reference to the generated files. Even the files do not show up in the project, you still can write extensions for the generated classes.
You can find more detailed information in this answer.
Upvotes: 1