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

getting error in FunFacts Objective C Course

2015-03-20 15:31:17.484 FunFactsC[16304:1053074] You pressed me! 2015-03-20 15:31:17.485 FunFactsC[16304:1053074] -[ViewController showFunFact:]: unrecognized selector sent to instance 0x7fd058e70a10

I am able to press the button and get the text to show up in the console but the program crashes right after that. What could I be doing wrong? So far only have added a label and button.

2 Answers

Hi Aman,

Did you have a couple of attempts at creating the outlet or action connection? If so, there may be some old link that's not working so well any more.

As it isn't a compiler error, there's something that's operating at runtime that isn't happy. The most common thing is having a couple of attempts at the dragging connection bit.

You can see the connections in your code displayed as a little circle by the IBOutlet or IBAction. You can see what connection it is trying to do - there may be an issue in there.

Sorry for being so vague - but do let me know if I can help more.

Steve.

ah of course! should've known that - thanks steve! :)

Glad that worked! Runtime errors can be a real pain to track down.

Happy coding.

Steve.