Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

iOS Objective-C Basics (Retired) Introduction to Objective-C From Structs to Objects

Chris Tapia
Chris Tapia
1,684 Points

??Help with Object-C Implementation??

At 5:10, how does Doug create an implementation? Does he press certain keys?

3 Answers

Stone Preston
Stone Preston
42,016 Points

he doesnt create an implementation file (it already exists) he just switches from the header file (Sphere.h) to the implementation file (Sphere.m) by pressing command + control + up arrow. ( command + control + down arrow works as well). You can see those two files in the project navigator on the left.

Chris Tapia
Chris Tapia
1,684 Points

ok. how do you switch back to the header file after going to the implementation

Stone Preston
Stone Preston
42,016 Points

same way. the shortcut toggles between the two files. So if you were in Sphere.h and pressed command + control + up arrow it would switch to Sphere.m. If you wanted to go back to Sphere .h just press command + control + up arrow again and it will switch to Sphere.h. You can also just click the name of the file in the project explorer on the left side of xcode