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 trialDex Gray
5,321 PointsDid 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
2,504 PointsHi 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
Ryan Summe
4,618 PointsI 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?
Dex Gray
5,321 PointsDex Gray
5,321 PointsThanks 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...