类不是键值编码兼容的键

编程入门 行业动态 更新时间:2024-10-05 07:26:38
本文介绍了类不是键值编码兼容的键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我目前正在学习如何编写iPhone,虽然开始的iPhone 4开发书由Jeff LaMarche但是遇到一个问题,我似乎不能看到问题在哪里。我在许多论坛上看到说,这是一个问题,IBOutlets没有正确连接,但我已经尝试了很多次,问题不消失,所以我在这里请求帮助。

I'm currently learning how to code for iPhone though the Beginning iPhone 4 development book by Jeff LaMarche but have come across a problem that I cannot seem to see where the problem lies. I have read on many forums saying that this is a problem with IBOutlets not being connected correctly but I have tried it many times and the problem does not go away so I'm here asking for help.

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

推荐答案

打开你的nib文件,检查datepicker插座是否连接到你的UIDatepicker。这个问题出现当引用插座没有设置。

Open your nib file and check whether datepicker outlet is connected to your UIDatepicker .This problem arises when referncing outlet not set.

请按照以下步骤操作 1.打开您的MainWindow笔尖。 2.选择DataPickerViewController。 3.将其类(Alt + 4)更改为DataPickerViewController(目前为UIViewController)。 4.保存Nib并运行,将工作。

Please follow this steps 1. Open your MainWindow nib. 2. Select DataPickerViewController. 3. Change Its Class(Alt+4) to DataPickerViewController (Currently it's UIViewController). 4.Save the Nib and run, will work.

更多推荐

类不是键值编码兼容的键

本文发布于:2023-11-26 19:04:28,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1634813.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:键值

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!