3

我在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];
4

1 回答 1

1

错误消息听起来像是“BasicMathLevelOne.xib”中的连接断开。这是 KVC 尝试InheritController为键“you”设置值的结果,但该类没有符合 KVC 的访问器(还有吗?)。

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

哦,好吧,再找一个教授。

于 2012-11-28T08:17:05.553 回答