我正在运行 xcode 5.1.1 并且一直在尝试学习客观的 C / iOS 开发。现在,每当我尝试在模拟器上运行我的代码(我没有实际的设备 atm)时,它都会出现黑屏。代码可以在这里找到。编译和运行给我以下错误:
2014-08-23 10:42:57.429 Calculator[1862:60b] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<XYZViewController 0xe436640> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key didgetPressed.'
*** First throw call stack:
(
0 CoreFoundation 0x017ed1e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x0156c8e5 objc_exception_throw + 44
2 CoreFoundation 0x0187cfe1 -[NSException raise] + 17
3 Foundation 0x0122cd9e -[NSObject(NSKeyValueCoding) setValue:forUndefinedKey:] + 282
4 Foundation 0x011991d7 _NSSetUsingKeyValueSetter + 88
5 Foundation 0x01198731 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 267
6 Foundation 0x011fab0a -[NSObject(NSKeyValueCoding) setValue:forKeyPath:] + 412
7 UIKit 0x004e31f4 -[UIRuntimeOutletConnection connect] + 106
8 libobjc.A.dylib 0x0157e7de -[NSObject performSelector:] + 62
9 CoreFoundation 0x017e876a -[NSArray makeObjectsPerformSelector:] + 314
10 UIKit 0x004e1d4d -[UINib instantiateWithOwner:options:] + 1417
11 UIKit 0x0034a6f5 -[UIViewController _loadViewFromNibNamed:bundle:] + 280
12 UIKit 0x0034ae9d -[UIViewController loadView] + 302
13 UIKit 0x0034b0d3 -[UIViewController loadViewIfRequired] + 78
14 UIKit 0x0034b5d9 -[UIViewController view] + 35
15 UIKit 0x0026b267 -[UIWindow addRootViewControllerViewIfPossible] + 66
16 UIKit 0x0026b5ef -[UIWindow _setHidden:forced:] + 312
17 UIKit 0x0026b86b -[UIWindow _orderFrontWithoutMakingKey] + 49
18 UIKit 0x002763c8 -[UIWindow makeKeyAndVisible] + 65
19 UIKit 0x00226bc0 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 2097
20 UIKit 0x0022b667 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 824
21 UIKit 0x0023ff92 -[UIApplication handleEvent:withNewEvent:] + 3517
22 UIKit 0x00240555 -[UIApplication sendEvent:] + 85
23 UIKit 0x0022d250 _UIApplicationHandleEvent + 683
24 GraphicsServices 0x037e2f02 _PurpleEventCallback + 776
25 GraphicsServices 0x037e2a0d PurpleEventCallback + 46
26 CoreFoundation 0x01768ca5 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
27 CoreFoundation 0x017689db __CFRunLoopDoSource1 + 523
28 CoreFoundation 0x0179368c __CFRunLoopRun + 2156
29 CoreFoundation 0x017929d3 CFRunLoopRunSpecific + 467
30 CoreFoundation 0x017927eb CFRunLoopRunInMode + 123
31 UIKit 0x0022ad9c -[UIApplication _run] + 840
32 UIKit 0x0022cf9b UIApplicationMain + 1225
33 Calculator 0x00002c8d main + 141
34 libdyld.dylib 0x01e34701 start + 1
35 ??? 0x00000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
我尝试了以下事情,但到目前为止没有任何效果
1)检查部署信息,它的主界面设置为main
2) 仔细检查所有断点以将其关闭并通过 Debug->Disable Breakpoints 禁用所有断点
3) 在 iOS 模拟器上重置内容和设置。
4)检查了 LLDB 调试器的问题,但是从我读到的内容来看,5.1.1 xcode 不再存在该问题。
5)检查本地主机是否仍然设置为127.0.0.1
谢谢!- 特林