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

programmable Auto Layout ?

hi,

I am a beginner, i just watch the lecture about introduction to auto layout in Treehouse, it is conducted in Swift 2. I often watch tutorial on Youtube about auto layout, but on youtube it's explained by using stack view, constraint etc in main story board , but in this course pasan explained using some mathematical equation about auto layout

my question is, is it only for swift 2 ? since i used swift 3 (xcode 8.3) at the moment. do i have to follow auto layout programatically ? just feel so daunting

1 Answer

Michael Hulet
Michael Hulet
47,913 Points

You don't have to do programmatic AutoLayout if you don't want to. In fact, the majority of Treehouse's videos use storyboards and AutoLayout in Interface Builder. That being said, it's good to know how to do things programmatically, so Treehouse teaches that, too. There are lots of libraries out there like PureLayout that makes programmatic AutoLayout easier