Swift生成的标题缺少Objective-C属性

时间:2016-07-28 01:04:28

标签: objective-c swift core-data nsmanagedobject swift-extensions

我有一个名为Message的核心数据生成类。 Message有一个消息属性,由于某种原因在Swift中无法访问。

您可以在头文件中清楚地看到message属性 You can clearly see the message property here in the header file

在消息I的Swift扩展中,无法访问消息属性 In a Swift extension of Message I'm unable to access the message property

在进一步挖掘后,我发现该属性甚至不存在于Message + CoreDataProperties.h的相应生成的Swift文件中

Upon digging around further I found that the property doesn't even exist in the corresponding generated Swift file for Message+CoreDataProperties.h

任何人都可以解释为什么会发生这种情况以及如何解决它?

1 个答案:

答案 0 :(得分:0)

您没有定义消息的类型,它是一种数据类型,将其初始化