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 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