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 Implementing Designs for iPhone Using Auto Layout and Managing the Keyboard Using Auto Layout for Various Screen Sizes

Ivan de Cabo
Ivan de Cabo
577 Points

Problem with constraints

Everythings works until min 5, when I change the form factor from 3.5" to 4" and seems that none of the constraints are working, all the objects stay at the same position. Any idea?

Thank you in advance!

3 Answers

Stone Preston
Stone Preston
42,016 Points

did you try running it in the 4'' simulator? try running it in the different simulators and see if the constraints work. it might just not be working in your storyboard view

Ivan de Cabo
Ivan de Cabo
577 Points

Actually, I think most of my problems with my bottom labels were caused because accidentally I put them into the ScrollView. Now those labels are working fine and as you said, the other constraints aren't working in my storyboard view, but is there any reason for that? I mean, in the tutorial theres no problem changing between the form factors.

Thank you anyway Stone, great community!

Stone Preston
Stone Preston
42,016 Points

I think there may be a setting you have to enable. I dont have xcode with me right now, but I think there may be a setting called simulated metrics or something that you have to enable. i cant remember for sure though

Ivan de Cabo
Ivan de Cabo
577 Points

"Update frames" was the magic button for me, now it works. As most of the times, the solution was in front of my eyes...

Thank you again!

Stone Preston
Stone Preston
42,016 Points

oh alright cool glad you got it working