Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/xcode/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Swift NSUnknownKeyException-Xcode_Swift_Xcode - Fatal编程技术网

Swift NSUnknownKeyException-Xcode

Swift NSUnknownKeyException-Xcode,swift,xcode,Swift,Xcode,我的程序显示了这个问题。谁能告诉我怎么了 "2016-08-26 17:21:00.548 SegundaTentativa[2347:203583] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<SegundaTentativa.ViewController 0x7f9749d188d0> setValue:forUndefinedKey:]: this class

我的程序显示了这个问题。谁能告诉我怎么了

"2016-08-26 17:21:00.548 SegundaTentativa[2347:203583] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<SegundaTentativa.ViewController 0x7f9749d188d0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key imQuadro.'
*** First throw call stack:
(
    0   CoreFoundation                      0x000000010786dd85 __exceptionPreprocess + 165
    1   libobjc.A.dylib                     0x0000000109611deb objc_exception_throw + 48
    2   CoreFoundation                      0x000000010786d9c9 -[NSException raise] + 9
    3   Foundation                          0x0000000107c3f19b -[NSObject(NSKeyValueCoding) setValue:forKey:] + 288
    4   UIKit                               0x0000000108228d0c -[UIViewController setValue:forKey:] + 88
    5   UIKit                               0x000000010845f7fb -[UIRuntimeOutletConnection connect] + 109
    6   CoreFoundation                      0x00000001077a7890 -[NSArray makeObjectsPerformSelector:] + 224
    7   UIKit                               0x000000010845e1de -[UINib instantiateWithOwner:options:] + 1864
    8   UIKit                               0x000000010822f8d6 -[UIViewController _loadViewFromNibNamed:bundle:] + 381
    9   UIKit                               0x0000000108230202 -[UIViewController loadView] + 178
    10  UIKit                               0x0000000108230560 -[UIViewController loadViewIfRequired] + 138
    11  UIKit                               0x0000000108230cd3 -[UIViewController view] + 27
    12  UIKit                               0x0000000108106fb4 -[UIWindow addRootViewControllerViewIfPossible] + 61
    13  UIKit                               0x000000010810769d -[UIWindow _setHidden:forced:] + 282
    14  UIKit                               0x0000000108119180 -[UIWindow makeKeyAndVisible] + 42
    15  UIKit                               0x000000010808ded9 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4131
    16  UIKit                               0x0000000108094568 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1769
    17  UIKit                               0x0000000108091714 -[UIApplication workspaceDidEndTransaction:] + 188
    18  FrontBoardServices                  0x000000010b4a28c8 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 24
    19  FrontBoardServices                  0x000000010b4a2741 -[FBSSerialQueue _performNext] + 178
    20  FrontBoardServices                  0x000000010b4a2aca -[FBSSerialQueue _performNextFromRunLoopSource] + 45
    21  CoreFoundation                      0x0000000107793301 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    22  CoreFoundation                      0x000000010778922c __CFRunLoopDoSources0 + 556
    23  CoreFoundation                      0x00000001077886e3 __CFRunLoopRun + 867
    24  CoreFoundation                      0x00000001077880f8 CFRunLoopRunSpecific + 488
    25  UIKit                               0x0000000108090f21 -[UIApplication _run] + 402
    26  UIKit                               0x0000000108095f09 UIApplicationMain + 171
    27  SegundaTentativa                    0x0000000107688432 main + 114
    28  libdyld.dylib                       0x000000010a0d592d start + 1
    29  ???                                 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb) "

请注意错误消息:

Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<SegundaTentativa.ViewController 0x7f9749d188d0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key imQuadro.'
由于未捕获的异常“NSUnknownKeyException”而终止应用程序,原因:“[setValue:forUndefinedKey:]:此类不符合密钥imQuadro的键值编码。”
有些东西试图设置视图控制器的不存在的
imQuadro
属性,从堆栈跟踪中,当从脚本/xib加载控制器时,可能会发生这种情况


您很可能在interface builder中设置了错误的插座连接,如果您最初使用名称
imQuadro
创建插座,然后仅在代码中手动将其修复为
imgQuadro

请注意错误消息:

Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<SegundaTentativa.ViewController 0x7f9749d188d0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key imQuadro.'
由于未捕获的异常“NSUnknownKeyException”而终止应用程序,原因:“[setValue:forUndefinedKey:]:此类不符合密钥imQuadro的键值编码。”
有些东西试图设置视图控制器的不存在的
imQuadro
属性,从堆栈跟踪中,当从脚本/xib加载控制器时,可能会发生这种情况


您很可能在interface builder中设置了错误的插座连接,如果您最初使用名称
imQuadro
创建插座,然后仅在代码中手动将其修复为
imgQuadro

那么,我该怎么办?我再次更改名称,错误将继续:/在interface builder中检查您有哪些IBOutlet连接,如果有名称不正确的连接,请删除这些连接并使用正确的名称连接到插座o,我该怎么办?我再次更改名称,错误将继续:/在interface builder中检查您有哪些IBOutlet连接,如果有名称不正确的连接,请删除它们并使用正确的名称连接到插座