NSmanagedobject 子类的子类

Subclass of Subclass of NSmanagedobject

我想添加 class "person" 的一些业务逻辑,它是 NSmanagedObject

的子class

Is Categories is the only option to Implement the Business logic of a sublass of NSmanagedobject ?

因为我不想在同一个 class 中实现业务逻辑,它是 NSManagedObject class

的子class

期待您的参与

谢谢,

人们通常有两种方法来处理这个问题。

第一个是向特定模型添加类别并在那里设置逻辑

第二个是使用https://github.com/rentzsch/mogenerator工具。

第二个选项需要一些设置,但除此之外是更好的选择。

希望对您有所帮助。