Generate code for core data attributes in xcode 4

筅森魡賤 提交于 2019-12-06 20:02:48

问题


In xcode 3 there was a helpful feature in the data model builder where you could highlight some attributes/relationships in an entity, right-click, and choose to copy method and property declarations to the clipboard. (You could choose if you wanted objective-c 2.0 property declarations also). Then you could paste them into your NSManagedObject subclass.

I see how you can still generate the entire class file; but this isn't helpful if you are adding attributes to an existing entity. Have they removed this feature from xcode 4? I used it all the time!


回答1:


See the Core Data Model Editor Help: Creating Objective-C Accessor Methods for a Managed Object




回答2:


You may find MoGenerator useful.




回答3:


Watch out for the fact that the special paste menu item only appears in the Edit menu not the contextual menu in the source editor.



来源:https://stackoverflow.com/questions/5327600/generate-code-for-core-data-attributes-in-xcode-4

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!