Featured post
iphone - How can I specify where I want my UI elements to go on orientation change in Interface Builder? -
ok know bit of newbie question, being newbie ok! have view trying make orientation friendly in ib, , having difficulties.
i have looking nice in portrait of course, when go landscape mode (by hitting arrow in top-right corner) gets messed up.
now, because of way view laid out, need align 3 buttons along bottom of image view in portrait, , in landscape, 3 buttons need symmetrically aligned along right side.
no combination of fiddling red arrows in size inspector rewarding me results seeking. possible set buttons 1 way in 1 orientation in ib, , on change, set them different?
i have looked around useful ib tutorial, haven't been able find anything.
i know want in ib, if you're willing try programmatically, can move things around pretty easily. buttons, implement setcenter method this:
[mybutton setcenter:cgpointmake(xcenter,ycenter)];
otherwise, if want use ib, use autosizing options. arrows stretch or compress width , height, , bars (|-|) preserve distances top , bottom. if have 3 buttons in row, can fix left distance left button, right distance right button , both/neither center button. may work.
the third option make new view, call landscapeview or something, dragging uiview library window file's owner, first responder, view, etc. orient landscape, copy on ui objects, lay them out like, , when rotate, replace current view landscapeview. problem i've found (one of many) have reconnect , have different iboutlets labels , whatnot. t
- Get link
- X
- Other Apps
Comments
Post a Comment