Iphone app ios未知密钥异常

时间:2012-11-28 08:05:18

标签: ios

我一直在xcode中得到这个例外

2012-11-27 23:42:51.239 MichaelWidickProject[9640:c07] Application windows are expected to have a root view controller at the end of application launch
2012-11-27 23:42:52.825 MichaelWidickProject[9640:c07] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<InheritController 0x8e40cc0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key you.'
*** First throw call stack:
(0x1c93012 0x10d0e7e 0x1d1bfb1 0xb7d711 0xafeec8 0xafe9b7 0xb29428 0x2350cc 0x10e4663 0x1c8e45a 0x233bcf 0xf8e37 0xf9418 0xf9648 0xf9882 0xf9b2a 0x110ef5 0x110fdb 0x111286 0x111381 0x111eab 0x111fc9 0x112055 0x2173ab 0x6892d 0x10e46b0 0x228ffc0 0x228433c 0x2284150 0x22020bc 0x2203227 0x22038e2 0x1c5bafe 0x1c5ba3d 0x1c397c2 0x1c38f44 0x1c38e1b 0x1bed7e3 0x1bed668 0x1865c 0x1f6d 0x1e95)
libc++abi.dylib: terminate called throwing an exception

我正在尝试单击按钮,然后按下按钮将视图控制器推送到导航视图控制器。我已经尝试了我能想到的一切。 我的教授无法理解这一点真是太奇怪了。请帮忙

InheritController *gameOne = [[InheritController alloc] initWithNibName:@"BasicMathLevelOne" bundle:nil];
gameOne.title = @"Level One:Basic Game";
[self.navigationController pushViewController:gameOne animated:NO];

1 个答案:

答案 0 :(得分:1)

错误消息听起来像是“BasicMathLevelOne.xib”中的断开连接。这是KVC尝试在您的InheritController上为“你”键设置一个值的结果,但该类没有符合KVC标准的访问者(更多?)。

要找到发生错误的确切位置,请在Xcode中设置异常断点(按Command-6,单击左下角的“+”,选择“Add Exception Breakpoint”)。在调试器中运行应用程序应使其停止在发生错误的位置。

哦,好了,找另一位教授。