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

Randell Purington
Randell Purington
9,992 Points

I am not able to add the UILable.

in the video, he command clicks on it and it adds it. but mine doesn't do that. I have to copy and paste or type it out myself. What am i doing wrong?

Taylor Smith
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Taylor Smith
iOS Development Techdegree Graduate 14,153 Points

the only way to added objects like a Label to your projects are either copy/paste or dragging over from the object library. Is it possible he was hitting command + C to copy and command + v to paste?

3 Answers

Randell Purington
Randell Purington
9,992 Points

I went back and reviewed it again and he says "command click on UIKit, scroll down and command click on UILable". When he does it works in the video and it imports a bunch of different things. but it doesn't work for me and when I type it out or copy and paste nothing happens except say import UIKit.UILable.

Taylor Smith
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Taylor Smith
iOS Development Techdegree Graduate 14,153 Points

can you give me the link for the video you're talking about? Sounds like he's just showing you the behind the scenes of the UIKit framework

Taylor Smith
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Taylor Smith
iOS Development Techdegree Graduate 14,153 Points

Randell Dougherty... Pasan Premaratne is simply showing you the "behind the scenes" of the UIKit framework. When you CMD + Click on code in your project, you can "jump to definition" which takes you to where that code was written (and in this case, Apple wrote the UIKit framework). this is designed to give you a deeper understanding of how things are designed in Swift. If you want to actually add a label to your project, you have to drag it over from the Object Library. :)