通用应用程序错误
我正在尝试实现一个通用应用程序(适用于 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来您的 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.