ios - Modify how auto resize works on UIView? -
i have uiview sized fit entire screen minus 5 pixels on each side. have set autoresize makes view lose 5 pixels on 1 side, , fills sides when flipped horizontally. need 5 pixel buffer exist in orientations. there way can tweak way auto resize works make happen?
my code:
[newsfeed setautoresizingmask:uiviewautoresizingflexiblewidth]; also, have dragged 1 of many views in storyboard, , 1 not respond code above. how can make auto resize?
when specify top , bottom margin flexible, in effect left , right margins fixed. try this:
[newsfeed setautoresizingmask:uiviewautoresizingflexiblewidth | uiviewautoresizingflexibletopmargin | uiviewautoresizingflexiblebottommargin]; as others have commented, more done in interface builder springs , struts:

Comments
Post a Comment