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 Build a Simple iPhone App with Swift Views and View Controllers Designing Our App With Interface Builder

David Shen
David Shen
13,611 Points

Why I cannot reposition label? and simulator is showing black?

Once I follow the step drag the label to view, it's stuck there and can reposition, same as other UI elements.

Screenshot http://note.io/1u6acmD

4 Answers

David Shen
David Shen
13,611 Points

Aha...I figure it out. Previously I delete the view accidentally and just have UI elements directly under view controller. You should always put UI elements under View.

Screenshot http://note.io/1ubYBCw

To further elaborate on David Shen's comment

To add a view, go to the object library -> type "view" in the search field -> drag the view to the view controller-> now you can add the label and button object

Worked for me. Thanks!

Did you see your size inspector? What did you find there?

David Shen
David Shen
13,611 Points

Nothing special....http://note.io/1sTruai

I feel like is there a lock or something can free this up.

Do you have zoom maybe?

If you are in zoom mode, it will not allow you to do anything. Its like overall view. If you click on the grey , or non apple view, twice , it should make it normal .

If it didn't work , then i have no clue .

David Shen
David Shen
13,611 Points

No. I don't have zoom. This is weird. Is that possible I put the label in the wrong layer?

Full screen shot http://note.io/1zbDf0e

err hmmm, not completely sure, I'm quite new to Xcode too , I'm just experimenting with it a bit to get used to it .
I just do some random stuff.

Maybe if you want to keep moving with good quality effect, create new project and just click one on the storyboard and put the label there in the iPhone box the rectangle screen. It should help i guess. If not then umm you may download a file from treehouse staff and customise it .