2016-12-14 23:17:04.949 TestProject[15212:17645799] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<TestProject.ViewController 0x7fc224609360> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key theLabel.' *** First throw call stack: ( 0 CoreFoundation 0x000000010f53234b __exceptionPreprocess + 171 1 libobjc.A.dylib 0x000000010c93221e objc_exception_throw + 48 2 CoreFoundation 0x000000010f532299 -[NSException raise] + 9 3 Foundation 0x000000010c44226f -[NSObject(NSKeyValueCoding) setValue:forKey:] + 291 4 UIKit 0x000000010cf9b4ef -[UIViewController setValue:forKey:] + 88 5 UIKit 0x000000010d20f79e -[UIRuntimeOutletConnection connect] + 109 6 CoreFoundation 0x000000010f4d7590 -[NSArray makeObjectsPerformSelector:] + 256 7 UIKit 0x000000010d20e122 -[UINib instantiateWithOwner:options:] + 1867 8 UIKit 0x000000010cfa1c21 -[UIViewController _loadViewFromNibNamed:bundle:] + 386 9 UIKit 0x000000010cfa2543 -[UIViewController loadView] + 177 10 UIKit 0x000000010cfa2878 -[UIViewController loadViewIfRequired] + 201 11 UIKit 0x000000010cfa30cc -[UIViewController view] + 27 12 UIKit 0x000000010ce6cc51 -[UIWindow addRootViewControllerViewIfPossible] + 71 13 UIKit 0x000000010ce6d3a2 -[UIWindow _setHidden:forced:] + 293 14 UIKit 0x000000010ce80cb5 -[UIWindow makeKeyAndVisible] + 42 15 UIKit 0x000000010cdf9c89 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4818 16 UIKit 0x000000010cdffde9 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1731 17 UIKit 0x000000010cdfcf69 -[UIApplication workspaceDidEndTransaction:] + 188 18 FrontBoardServices 0x0000000110bf6723 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 24 19 FrontBoardServices 0x0000000110bf659c -[FBSSerialQueue _performNext] + 189 20 FrontBoardServices 0x0000000110bf6925 -[FBSSerialQueue _performNextFromRunLoopSource] + 45 21 CoreFoundation 0x000000010f4d7311 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17 22 CoreFoundation 0x000000010f4bc59c __CFRunLoopDoSources0 + 556 23 CoreFoundation 0x000000010f4bba86 __CFRunLoopRun + 918 24 CoreFoundation 0x000000010f4bb494 CFRunLoopRunSpecific + 420 25 UIKit 0x000000010cdfb7e6 -[UIApplication _run] + 434 26 UIKit 0x000000010ce01964 UIApplicationMain + 159 27 TestProject 0x000000010c3530ef main + 111 28 libdyld.dylib 0x000000011045f68d start + 1 ) libc++abi.dylib: terminating with uncaught exception of type NSException (lldb)
Closed due to the fact that the essence of the question is incomprehensible by the participants Max Mikheyenko , VAndrJ , Denis , user194374, aleksandr barakin 24 Dec '16 at 23:59 .
Try to write more detailed questions. To get an answer, explain what exactly you see the problem, how to reproduce it, what you want to get as a result, etc. Give an example that clearly demonstrates the problem. If the question can be reformulated according to the rules set out in the certificate , edit it .
- oneerror from the bottom right of the console. copy all the text and add to the question - Max Mikheyenko
- @ MaxMikheyenko added! - Goncharoff
- Check theLabel, it is not connected to your code - VAndrJ
|
1 answer
In the code (in particular, ViewController.swift), the variable is called theLabel1 , and in the construction code, the link is written to the variable theLabel .
Either change the variable back, or make a new link from the storyboard
- I tried, but something does not help - Goncharoff
- maybe there is another problem? - Goncharoff
- may still make sense to make clean rebuild. If you want to give a link to the project, it will be faster to see - Max Mikheyenko
- yadi.sk/d/cPQdTRz733dt6s - Goncharoff
- corrected the answer @Goncharoff - Max Mikheyenko
|
