Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the basic difference between Auto Layout and Auto Resizing in iOS

I have been searching the proper difference between Auto Layout and Auto Resizing, but didn't able to find the exact answer. Where I can use "Auto Layout" and where "Auto Resizing" in app? Any help would be a part of thanks.

like image 774
Arvind Avatar asked Aug 29 '14 06:08

Arvind


1 Answers

As Matt Neuburg states in his book:

Autoresizing is a matter of conceptually assigning a subview “springs and struts.” A spring can stretch; a strut can’t. Springs and struts can be assigned internally or externally. Thus you can specify (using internal springs and struts) whether and how the view can be resized, and (using external springs and struts) whether and how the view can be repositioned.

And

Autolayout, depends on the constraints of views. A constraint (an instance of NSLayoutConstraint) is much more sophisticated than the "autoresizingMask" it’s a full-fledged object with numeric values, and can describe a relationship between any two views (not just a subview and its superview).

like image 183
Santosh Sharma Avatar answered Sep 21 '22 20:09

Santosh Sharma