Auto Layout (Limitations) Vs Mask for automatic resizing (springs and struts)

These layout systems help you resize your screen regardless of screen size and orientation.

If I have a mask for automatic resizing (Springs and Struts), for example, a simple solution, why should I use automatic layout (constraints)?

+6
source share
2 answers

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

Auto-layout can do everything Springs and Struts provides us with and much more.

Auto-layout can be applied to any two views, depending on the need, and not just to the hierarchy of parent children, such as Springs and Struts . we can give priority to limitations and have limited inequalities.

Suggestion: when you start using automatic layout on views, you should first carefully analyze "How views will be displayed for different scenarios," and then, according to your needs, restrictions apply, the more you use them, you will learn how complex problems can be Easily resolved by automatic layout.

+5
source

Automatically linking a more powerful tool to place you components, with dependencies between views (not just view + subview)

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

0
source

Source: https://habr.com/ru/post/973150/


All Articles