iOS center button on rotations -
i have uiview subview of uiview. within uiview have button want centered. problem running that, since subview can change sizes upon rotations, button gets off centered. there way auto-centering?
try setting button center uiview center this:
[mybutton.setcenter:mysubview.center];
and set autoresizing mask:
[mybutton setautoresizingmask:uiviewautoresizingflexibleleftmargin | uiviewautoresizingflexiblerightmargin];
hope helps.
Comments
Post a Comment