Question

These layout systems help you for resizing regardless screen size and orientation.

If I have Auto resizing mask(Springs & Struts) like easy solution, why should I use Auto Layout(Constraints) ?

Was it helpful?

Solution

I had the same question when I started using auto layout...

Auto Layout can do all that Springs & Struts provides us and more.

Auto Layout can be applied to any two views depending on the need and not only to parent child view hierarchy like Springs & Struts. we can give priority to constraints and have constraint inequalities.

Suggestion: when you start applying auto layout on views, first you should thoroughly analyze "How the views will behave for different scenarios" and then according to your needs apply constraints, the more you use it you come to know how difficult problems can be solved quite easily by auto layout.

OTHER TIPS

Auto Layout more powerful instrument for placing you components, with dependences between views (not only view + subview)

Apple has good guide about Auto Layout: https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/AutolayoutPG/Introduction/Introduction.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top