您的位置:首页 > 产品设计 > UI/UE

文件连接his class is not key value coding-compliant for the key文件连接

2013-04-19 21:26 501 查看
今天一直在学习文件连接之类的问题,上午正好有机会和大家共享一下.

this class is not key value coding-compliant for the key

一般此问题 都是由interface build与码代中IBOutlet的连接所起引的。

多是在码代中对iboutlet的名称进行了修改,致使interface build中的连接实效。

如果在该viewcontroller连接的xib文件中没发明错误,

那就很多是mainWindow.xib文件中存在问题,

本人碰到的问题是在mainWindow.xib的tabbarcontroller的某个tab的viewcontroller置设了loadfrom"**.xib",

但忘了将其class设为对应的viewcontroller类了。

仔细检查自己的nib文件,清算、正修不正确的连接系关便可。

LRDemo[55313:c07] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<MainViewController 0x8852580> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key mainTableView.'

助求:为什么在 两个文件 其中一个是 MainViewController 另一个是 TestViewController 他们面里都是空的,没有内容, 然而 MainViewController 不可以用,一用就错出 提示:

LRDemo[55313:c07] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<MainViewController 0x8852580> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key mainTableView.'

而 TestViewController 可用呢

闷郁中

文章结束给大家分享下程序员的一些笑话语录:

联想——对内高价,补贴对外倾销的伟大“民族”企业。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐