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

Adam Warner
Adam Warner
546 Points

Confusion at 5:23 in the video "From Structs to Objects"

At this segment in the video (the first video transitioning us from C to Obj.C), the speaker highlights 2 lines (the "setter" and the "getter") and makes an "implementation" with them. The issue is that he causes the rest of the code (the foundation code) to just disappear in favor of: (the implementation code). He returns back and forth several times between the code sections, but always fails to explain how this is even done. HIGHLY confusing for a first video covering Obj. C. Anyone have any ideas to help with this?

Adam Warner
Adam Warner
546 Points

I should say that it APPEARS that he is switching between the "Sphere.h" in the left sidebar and the "Sphere.m" in the left sidebar, but there is no highlighting of the Sphere.m section to indicate that this is what is happening.

Adam Warner
Adam Warner
546 Points

May have answered my own question (though a confirmation of this would make me feel better ;). It seems as if he is swiping left or right or quick switching between the two code sections by swiping left and right. It would appear that Xcode in that case DOES NOT change the sidebar highlight to indicate which section of code a user is currently on.

IF this is the case, it appears to speak to a simple UI/UX issue with Xcode more than a problem with the video. Though I do still find the intro overwhelming just one lesson after regular C programming.

2 Answers

Stone Preston
Stone Preston
42,016 Points

I assume he is using the control + command + up/down arrow keyboard shortcut to switch between the implementation and header files. He does not make an implementation, it already exists, he just switches to it. Yes Xcode does not highlight the newly selected file if you switch using the shortcut, only if you select it in the file explorer

Adam Warner
Adam Warner
546 Points

Thank you for the clarification. Just threw me off. As a designer for a 10+ years, UI/UX oddities like that bug me more than most. THANK YOU again for the quick response!