2017-04-20 116 views
0

该类不是键值编码兼容的关键问题

"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.'" 

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

感谢您的协助。如果需要,将提供更多的屏幕截图。

+0

在xib/storyboard中,右键单击你的'Files Owner' /'ViewController'查看插座列表。检查课堂中是否存在任何出口。 – janusbalatbat

回答

0

在您的xib/storyboard,右键点击您的Files Owner/ViewController查看网点列表。检查课堂中是否存在任何出口。当您连接IBOutlet然后删除或重命名属性时,可能会发生这种情况。下面的示例显示了一个名为IBOutlet显示labelIDeleted警告,因为我从类中删除属性

enter image description here

编辑:

还要检查,如果你的ViewController分配正确的类。 enter image description here

+0

http://imgur.com/6uJlur7 有没有这样的警觉所以我不会知道该怎么做 – user7898292

+0

@ user7898292检查编辑答案 – janusbalatbat

+0

类已经被设置为视图控制器,并迅速文件是ViewController.swift – user7898292

相关问题