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 Self-Destructing Message iPhone App Designing and Starting the App Adding Login and Sign Up Screens

Dex Gray
Dex Gray
5,321 Points

Did you notice that each time Ben pulls an element onto the screen, it AUTOMATICALLY implements constraints? How??

Did you notice that each time Ben pulls an element onto the screen, it AUTOMATICALLY implements constraints? How??

2 Answers

Imran Mouna
Imran Mouna
2,504 Points

Hi Dex,

I think I understand what you're asking. The constraints are just implemented based on where the element is positioned (centred, distance from top, etc.) It's a built in functionality to make things easier for developers (I believe, I don't work for Apple or anything but that's my guess). You can edit them after you position the element manually, but if you wanted it to stay where you put it originally then the constraints are already mapped for you.

Hope that helps,

Imran

Dex Gray
Dex Gray
5,321 Points

Thanks for replying Imran! But do you mean the auto-layout at work here? Because actually I get the signs of ambiguity there (you know the dotted lines) - not the whole blue lines like in the video...

Ryan Summe
Ryan Summe
4,618 Points

I don't get any constraints like in the video. Perhaps it is because at the time of this video there was only one iphone screen size?