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 trialSeth Danner
2,592 PointsStuck on adding an IBAction to the code...
At 0:50 seconds into the video, we are shown how to add an action to the button by clicking (while holding down the control key) and dragging the button into the code just before the end of the ViewController class. The box opens up where we can set the connection to Action, and the name to showFact, and the argument to None. However, when I do those things and then click Connect, I get an error from Xcode that says: "Could not insert new action connection: Could not find a class named ViewController in the language Swift." I'm not sure what's going on here?...
1 Answer
Bruce Röttgers
18,211 PointsLook if you've selected in the instance inspector the right class like here: https://postimg.org/image/a7bdrco7p/