I have an iPhone project with several classes I need to make NSmanagedObjects so I can use them with Core Data, I know how to create new classes from the model, but 开发者_运维技巧is there a way to do the opposite, link the classes with the object model graph.
Consider use the Factory Method design pattern. Upon request, instantiate a new object and place it in the graph, and return the newly created object as a result..
精彩评论