通用应用程序错误

发布于 2024-09-09 05:26:03 字数 709 浏览 3 评论 0原文

我正在尝试实现一个通用应用程序(适用于 iPhone/iPad),并且我想使用相同的 UIViewController 来设置这两种设备的行为。

我在启动时遇到了一个令人惊讶的错误,即:

2010-07-15 11:31:03.420 AppUniverselle[2761:207] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIViewController 0x7000670> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key myLabel.'
2010-07-15 11:31:03.421 AppUniverselle[2761:207] Stack: (
    29291611,
    2421585161,
  ...
    2727445,
    2764719,
    8884,
    8738
)

我无法弄清楚我失败的地方。此外,为了避免任何拼写错误问题,我重新启动了该项目,但它以相同的错误结束。

最令人惊讶的一点是,该应用程序在 iPad 模拟器上运行良好,但在 iPhone 模拟器上却不行。也许 iPhone 模拟器有问题?

有人知道这个问题的答案或者听说过这类问题吗?

I'm trying to realize an universal application (for iPhone/iPad), and I'd like to use the same UIViewController to set up the behaviour for both of the devices.

I got a surprising error at launch time, which is :

2010-07-15 11:31:03.420 AppUniverselle[2761:207] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIViewController 0x7000670> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key myLabel.'
2010-07-15 11:31:03.421 AppUniverselle[2761:207] Stack: (
    29291611,
    2421585161,
  ...
    2727445,
    2764719,
    8884,
    8738
)

I can't figure out where I failed. Furthermore, to avoid any typo problem, I restarted the project, but it ends on the same error.

The main surprising point is that the application works fine on the iPad simulator, but not on the iPhone one. Perhap's there is a problem with the iPhone simulator ?

Does someone know the answer of this question or ever heard about that kind of problem ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

挖鼻大婶 2024-09-16 05:26:03

看起来您的 NIB 文件中有一个名为 myLabel 的插座,但您的视图控制器实例中没有这样的插座。

It looks like you have an outlet called myLabel in your NIB file, but there's no such outlet in your view controller instance.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文