-1

当我运行我的应用程序时,它会产生 Thread 1: signal SIGBART 错误消息,详细信息如下:

TappingGame[767:9324] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<ViewController 0x7fe5d0f12130> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key tapButton.'
*** First throw call stack:
 (
0   CoreFoundation                      0x000000010b07ee65 __exceptionPreprocess + 165
1   libobjc.A.dylib                     0x000000010aaf7deb objc_exception_throw + 48
2   CoreFoundation                      0x000000010b07eaa9 -[NSException raise] + 9
3   Foundation                          0x000000010a6c49bb -[NSObject(NSKeyValueCoding) setValue:forKey:] + 288
4   UIKit                               0x000000010b5ba320 -[UIViewController setValue:forKey:] + 88
5   UIKit                               0x000000010b7e8f41 -[UIRuntimeOutletConnection connect] + 109
6   CoreFoundation                      0x000000010afbf4a0 -[NSArray makeObjectsPerformSelector:] + 224
7   UIKit                               0x000000010b7e7924 -[UINib instantiateWithOwner:options:] + 1864
8   UIKit                               0x000000010b5c0eea -[UIViewController _loadViewFromNibNamed:bundle:] + 381
9   UIKit                               0x000000010b5c1816 -[UIViewController loadView] + 178
10  UIKit                               0x000000010b5c1b74 -[UIViewController loadViewIfRequired] + 138
11  UIKit                               0x000000010b5c22e7 -[UIViewController view] + 27
12  UIKit                               0x000000010b498ab0 -[UIWindow addRootViewControllerViewIfPossible] + 61
13  UIKit                               0x000000010b499199 -[UIWindow _setHidden:forced:] + 282
14  UIKit                               0x000000010b4aac2e -[UIWindow makeKeyAndVisible] + 42
15  UIKit                               0x000000010b423663 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4131
16  UIKit                               0x000000010b429cc6 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1760
17  UIKit                               0x000000010b426e7b -[UIApplication workspaceDidEndTransaction:] + 188
18  FrontBoardServices                  0x000000010ddf7754 -[FBSSerialQueue _performNext] + 192
19  FrontBoardServices                  0x000000010ddf7ac2 -[FBSSerialQueue _performNextFromRunLoopSource] + 45
20  CoreFoundation                      0x000000010afaaa31 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
21  CoreFoundation                      0x000000010afa095c __CFRunLoopDoSources0 + 556
22  CoreFoundation                      0x000000010af9fe13 __CFRunLoopRun + 867
23  CoreFoundation                      0x000000010af9f828 CFRunLoopRunSpecific + 488
24  UIKit                               0x000000010b4267cd -[UIApplication _run] + 402
25  UIKit                               0x000000010b42b610 UIApplicationMain + 171
26  TappingGame                         0x000000010a5f89ef main + 111
27  libdyld.dylib                       0x000000010d7ba92d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb) 

我查看了其他问题,但这些解决方案都不起作用。有没有人从列出的错误中知道为什么它不起作用?

谢谢

4

2 回答 2

1

您的链接不正确。可能您删除或更改了名称。

检查您IBOutlet的链接是否正确:

关联

并删除无效链接。

无效的链接

于 2015-12-16T19:51:14.530 回答
1

您的错误中描述的问题是由于您的故事板或笔尖中的链接类不正确。

于 2015-12-16T19:40:52.030 回答