Controls. Autorisizingmask for setting control dimensions and position
The Autoresizessubviews property indicates whether the control is automatically adjusted for position, by default Yes (allows automatic adjustment), such as setting the No,autoresizingmask property to be effective
Uiviewautoresizingnone
Control will not be automatically resized, the effect
Uiviewautoresizingflexibleheight
The height of the control changes proportionally to the height of the parent view. Otherwise, the view's height will remain unchanged.
Uiviewautoresizingflexiblewidth
The width of the control changes proportionally with the width of the parent view. Otherwise, the width of the view remains the same.
Uiviewautoresizingflexibleleftmargin
The left border of the control adjusts proportionally as the parent view width changes. Otherwise, the relative position of the control and its parent view's left edge remains the same.
Uiviewautoresizingflexiblerightmargin
The right border of the control adjusts proportionally as the width of the parent view changes. Otherwise, the relative position of the control and its parent view's right edge remains the same.
Uiviewautoresizingflexiblebottommargin
The bottom boundary of the control adjusts proportionally as the height of the parent view changes. Otherwise, the relative position of the control and its parent view's bottom boundary remains the same.
Uiviewautoresizingflexibletopmargin
The top bounds of the control adjust proportionally as the parent view height changes. Otherwise, the relative position of the top edge of the control and its parent view remains the same.
Set Multiple values
View.autoresizingmask = Uiviewautoresizingflexibleleftmargin | Uiviewautoresizingflexiblerightmargin;
Note: If there are multiple values, the "|" Association
IOS control size and position adjustment