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

google_microsoft 2012-04-17 08:23:40
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
...全文
1126 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
Snake_Jay 2012-04-19
  • 打赏
  • 举报
回复
1 确定是IB的问题。
2 你跟着某个教程,可能教程你并没有看得很仔细,遗漏了一部分。
3 怎么用IB,你还不是很清楚,建议多看看网上资料,各种连线是什么意思。
4 你的问题出现在TabBarController的设置上。
你的第一个tabItem绑定的应该是DataPickerViewController而不是UIViewController
(UIViewController中并没有datePicker这个属性,所以会出现错误).

你重新设置一下吧,就对了。
taito 2012-04-18
  • 打赏
  • 举报
回复
ib 创建的问题,还没细看,但建议少用 ib,如果要用,对应的IBoutlet也要连接好。

29,028

社区成员

发帖
与我相关
我的任务
社区描述
主要讨论与iOS相关的软件和技术
社区管理员
  • iOS
  • 大熊猫侯佩
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧