Autoresizingmask properties for controls on iOSSome results of personal testing
Adaptive Setautoresizingmask Controls
uiviewautoresizingnone   = 0
uiviewautoresizingflexib leleftmargin &NBSP; = 1 << 0
uiviewautoresizingflexib lewidth&NBSP; = 1 << 1
uiviewautoresizingflexib lerightmargin&NBSP; = 1 << 2
uiviewautoresizingflexib letopmargin&NBSP; = 1 << 3
uiviewautoresizingflexib leheight &NBSP; = 1 << 4
uiviewautoresizingflexib lebottommargin = 1 << 5
Uiviewautoresizingnone
uilabel * label = [[uilabel alloc ] initwithframe : cgrectmake (50 , < Span style= "word-wrap:normal; Word-break:normal ">100 , 200 , 40 )];
[Label setautoresizingmask: uiviewautoresizingnone]; Control does not change relative to top view coordinate values
cgrectmake (50 , 100 , 200 , 40 )
uiviewautoresizingflexiblewidth: The width of the control changes proportionally with the width of the parent view, for example
the width of the label width is 480 when the screen width is label width changed to 100*480/320 Similarlyuiviewautoresizingflexibleheight same
uiviewautoresizingflexibleleftmargin The distance to the left of the screenchanges proportionally with the width of the parent view
for Example< Span style= "word-wrap:normal; Word-break:normal; line-height:21px; Color:rgb (40,50,207) ">cgrectmake (50 , 100 , 200 , 40 )]; 50 width of the screen is when the screen width is 480 label width change to 50*480/320 control changed to cgrectmake (75, 100 , 200 , 40 )];
uiviewautoresizingflexiblerightmarginuiviewautoresizingflexibletopmarginuiviewautoresizingflexiblebottommargin
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
iOS Development-autoresizingmask