Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS Enhance a Weather App with Table Views Implementing the Detail View Adding UI Elements

Asko Krimann
Asko Krimann
19,367 Points

App crashes when selecting the day

So, app starts with no problems, but when I select, lets say Monday, it crashes.

I get error like this:

2016-03-03 19:27:22.899 Stormy2[13232:1921656] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<Stormy2.ViewController 0x7f87d18ae600> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key summayLabel.' *** First throw call stack: ( 0 CoreFoundation 0x000000010c657e65 exceptionPreprocess + 165 1 libobjc.A.dylib 0x000000010e5bfdeb objc_exception_throw + 48 2 CoreFoundation 0x000000010c657aa9 -[NSException raise] + 9 3 Foundation 0x000000010cc489bb -[NSObject(NSKeyValueCoding) setValue:forKey:] + 288 4 UIKit 0x000000010d22b320 -[UIViewController setValue:forKey:] + 88 5 UIKit 0x000000010d459f41 -[UIRuntimeOutletConnection connect] + 109 6 CoreFoundation 0x000000010c5984a0 -[NSArray makeObjectsPerformSelector:] + 224 7 UIKit 0x000000010d458924 -[UINib instantiateWithOwner:options:] + 1864 8 UIKit 0x000000010d231eea -[UIViewController _loadViewFromNibNamed:bundle:] + 381 9 UIKit 0x000000010d232816 -[UIViewController loadView] + 178 10 UIKit 0x000000010d232b74 -[UIViewController loadViewIfRequired] + 138 11 UIKit 0x000000010d238f4f -[UIViewController __viewWillAppear:] + 120 12 UIKit 0x000000010d268e44 -[UINavigationController _startCustomTransition:] + 1203 13 UIKit 0x000000010d27923f -[UINavigationController _startDeferredTransitionIfNeeded:] + 712 14 UIKit 0x000000010d27a3af -[UINavigationController __viewWillLayoutSubviews] + 57 15 UIKit 0x000000010d420ff7 -[UILayoutContainerView layoutSubviews] + 248 16 UIKit 0x000000010d1534a3 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 703 17 QuartzCore 0x0000000111cae59a -[CALayer layoutSublayers] + 146 18 QuartzCore 0x0000000111ca2e70 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 366 19 QuartzCore 0x0000000111ca2cee _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24 20 QuartzCore 0x0000000111c97475 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 277 21 QuartzCore 0x0000000111cc4c0a _ZN2CA11Transaction6commitEv + 486 22 UIKit 0x000000010d0c7b47 _afterCACommitHandler + 174 23 CoreFoundation 0x000000010c583367 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION + 23 24 CoreFoundation 0x000000010c5832d7 __CFRunLoopDoObservers + 391 25 CoreFoundation 0x000000010c578f2b __CFRunLoopRun + 1147 26 CoreFoundation 0x000000010c578828 CFRunLoopRunSpecific + 488 27 GraphicsServices 0x0000000111763ad2 GSEventRunModal + 161 28 UIKit 0x000000010d09c610 UIApplicationMain + 171 29 Stormy2 0x000000010bfff61d main + 109 30 libdyld.dylib 0x000000010f0c892d start + 1 31 ??? 0x0000000000000001 0x0 + 1 ) libc++abi.dylib: terminating with uncaught exception of type NSException

2 Answers

Steven Deutsch
Steven Deutsch
21,046 Points

Hey Asko Krimann,

Check your view controller for a disconnected outlet called summaryLabel. You can do this by right clicking on your view controller in the storyboard (the yellow circle).

Let me know what you see, good luck!

Asko Krimann
Asko Krimann
19,367 Points

Hey,

Thank you so much. Somehow I had created 2 outlets for summaryLabel. That fixed the problem.

Many thanks :)