对于关键问题,此类不符合键值编码

时间:2017-04-20 21:49:19

标签: ios swift sigabrt

我通过消息

继续遇到SIGABRT错误
"2017-04-20 17:37:54.872 SepsisHub[3670:1670129] Unknown class _TtC10Sepsis_Hub14ViewController in Interface Builder file.
2017-04-20 17:38:54.903 SepsisHub[3670:1670129] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIViewController 0x7fcb8ae03240> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key FirstHour.'"

但是,我找不到storyboard或.swift文件中缺少的连接。构建时没有错误消息,似乎由于某种原因,程序无法找到IBOutlet,我不明白为什么考虑我已经删除它们并在swift文件和storyboard连接器中重新连接多次更改。

感谢您的帮助。如果需要,将提供进一步的屏幕截图。

1 个答案:

答案 0 :(得分:0)

xib/storyboard,右键点击Files Owner / ViewController,查看商家列表。检查班上不存在的任何插座。当您连接IBOutlet然后删除或重命名该属性时,可能会发生这种情况。下面的示例显示IBOutlet名为labelIDeleted的警告显示警告,因为我从班级

中删除了该属性

enter image description here

编辑:

同时检查您的ViewController是否分配了正确的课程。 enter image description here