Objective-C在单独文件中部分实现类 [英] Objective-C partial implementation of classes in separate files
问题描述
我使用核心数据,并从我的数据模型生成类。
I am using core data and am generating classes from my data model.
我在这些类中实现自定义方法,但是当我重新生成时,我最后拷贝和粘贴一点。我想要做的是拆分我的实现文件('.m'),所以我可以有一个头文件与多个'.m'文件。然后我可以保持我的自定义方法在一个,不必担心擦除他们,当我再生。我使用这种技术在.NET中很多与其部分关键字。在objective-C中有类似的东西
I implement custom methods in these classes, however when i regenerate i generate over the top so i end up copying and pasting a bit. What i would like to do is split my implementation files ('.m') so i can have one header file with multiple '.m' files. then i can keep my custom methods in one and not have to worry about erasing them when i regenerate. I use this technique in .NET a lot with its partial keyword. Is there anything similar in objective-C
推荐答案
你也可以看看 mogenerator ,它采用不同的方法为实体生成类。
You may also want to look at mogenerator, which takes a different approach to generating classes for entities.
这篇关于Objective-C在单独文件中部分实现类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!