首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > Iphone >

setValue:forUndefinedKey:]: this class is not key value coding-compliant for the

2012-04-21 
setValue:forUndefinedKey:]: this class is not key value coding-compliant for theTerminating app due

setValue:forUndefinedKey:]: this class is not key value coding-compliant for the
Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIViewController 0x6b61880> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key datePicker.'

只要一运行就爆这个错,下面是代码

http://files.cnblogs.com/itgiant/Pickers.zip


[解决办法]
1 确定是IB的问题。
2 你跟着某个教程,可能教程你并没有看得很仔细,遗漏了一部分。
3 怎么用IB,你还不是很清楚,建议多看看网上资料,各种连线是什么意思。
4 你的问题出现在TabBarController的设置上。
你的第一个tabItem绑定的应该是DataPickerViewController而不是UIViewController
(UIViewController中并没有datePicker这个属性,所以会出现错误).

你重新设置一下吧,就对了。

热点排行