Objective-C这个类不是密钥值编码兼容的密钥findContact。'

时间:2014-08-28 10:00:05

标签: ios objective-c uiviewcontroller

我使用 this tutorial制作的应用有问题。

一切似乎都很好,但是当我构建时,会出现错误:

2014-08-28 11:49:20.038 techtopiatut[1551:60b] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<ViewController 0x8c4dd00> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key findContact.'

如果有人想看项目,那就是 here

3 个答案:

答案 0 :(得分:3)

您已删除了一些按钮,但仍然存在引用。见:

enter image description here

转到故事板,然后删除黄色标记的参考号。这会奏效。然后它会是这样的:

enter image description here

答案 1 :(得分:1)

我发现问题...您的按钮SaveFind仍在引用您的FileOwner删除引用,就是这样......

有关详细信息,请参阅图像,然后单击箭头指向的x。继续Save的同样做法。

enter image description here

答案 2 :(得分:1)

这是因为无效的出口。

如果您在此处saveData删除Referencing Outlets

enter image description here

并删除此处findContact中的Referencing Outlets

enter image description here