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 Simple iPhone App with Swift Views and View Controllers View Controllers and IBAction

Benjamin U'Sellis
Benjamin U'Sellis
1,762 Points

Getting a top_level_code error when trying to run showFunFact func

When I try to run the app after adding the following func as described in the video...

@IBAction func showFunFact() { println("You pressed me!") }

The app won't run and I get a debug window that pulls up the following under top_level_code...

class AppDelegate: UIResponder, UIApplicationDelegate { "Thread 1: signal:SIGNABRT"

I'm a beginner and totally lost on why this is happening. Anyone have any ideas? Many thanks.

Make sure you have reconnected the old outlets and actions.