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 Build a Weather App with Swift (Retired) Displaying Our Weather Data Adding a Refresh Button

Rajiv Barton
Rajiv Barton
12,051 Points

App crashes when refresh

2015-01-08 19:59:48.687 Stormy[2170:211408] -[Stormy.ViewController refresh:]: unrecognized selector sent to instance 0x7f925143a2e0 2015-01-08 19:59:49.045 Stormy[2170:211408] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[Stormy.ViewController refresh:]: unrecognized selector sent to instance 0x7f925143a2e0' *** First throw call stack: ( 0 CoreFoundation 0x000000010d842f35 exceptionPreprocess + 165 1 libobjc.A.dylib 0x000000010f386bb7 objc_exception_throw + 45 2 CoreFoundation 0x000000010d84a04d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205 3 CoreFoundation 0x000000010d7a227c ___forwarding_ + 988 4 CoreFoundation 0x000000010d7a1e18 CF_forwarding_prep_0 + 120 5 UIKit 0x000000010e0cf8be -[UIApplication sendAction:to:from:forEvent:] + 75 6 UIKit 0x000000010e1d6410 -[UIControl _sendActionsForEvents:withEvent:] + 467 7 UIKit 0x000000010e1d57df -[UIControl touchesEnded:withEvent:] + 522 8 UIKit 0x000000010e115308 -[UIWindow _sendTouchesForEvent:] + 735 9 UIKit 0x000000010e115c33 -[UIWindow sendEvent:] + 683 10 UIKit 0x000000010e0e29b1 -[UIApplication sendEvent:] + 246 11 UIKit 0x000000010e0efa7d _UIApplicationHandleEventFromQueueEvent + 17370 12 UIKit 0x000000010e0cb103 _UIApplicationHandleEventQueue + 1961 13 CoreFoundation 0x000000010d778551 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION_ + 17 14 CoreFoundation 0x000000010d76e41d __CFRunLoopDoSources0 + 269 15 CoreFoundation 0x000000010d76da54 __CFRunLoopRun + 868 16 CoreFoundation 0x000000010d76d486 CFRunLoopRunSpecific + 470 17 GraphicsServices 0x000000011152b9f0 GSEventRunModal + 161 18 UIKit 0x000000010e0ce420 UIApplicationMain + 1282 19 Stormy 0x000000010d24c39e top_level_code + 78 20 Stormy 0x000000010d24c3da main + 42 21 libdyld.dylib 0x000000010fb60145 start + 1 ) libc++abi.dylib: terminating with uncaught exception of type NSException

Thats what I get for my error message. Not sure how to fix the issue. Any help. Ive gone through my code against that in the file download files from tree house and it is exactly the same minus the api key and coordinates. Help please!

2 Answers

Rajiv Barton
Rajiv Barton
12,051 Points

Never mind I fixed it. It looks like I had an extra "View Controller refresh in the connections inspector. Deleted that extra connection and it was good to go!

Rajiv Barton
Rajiv Barton
12,051 Points

I also get these error messages. Frame for "RAIN" will be different at run time.

same issue with cloudy-night and my city label.