iOS 9 adds UIStackView
(and OS X 10.9 introduced the similar NSStackView
), which makes it easier to use Auto Layout, reducing the need to create NSLayoutConstraint
s. In practice, you may still need to create a couple of constraints when you use UIStackView
. These constraints usually has less to do with positioning views, but more for keeping them at the correct dimensions, notably for views that don't return a good value for -intrinsicContentSize
.
It is really nice for layout and you really should start using it as soon as you can. Most of us wouldn't be able to support a minimum deployment target of iOS 9 any time soon, but there's a wonderful clone of UIStackView
called TZStackView that you can use in place of UIStackView
. It supports the same API. The only downside is TZStackView
doesn't support Storyboards.
Check it out.
Your feedback is valuable: Do you want more nuggets like this? Yes or No
.
.