iphone - How set text field and button at center of view automatically when mode change? -



iphone - How set text field and button at center of view automatically when mode change? -

i want set text field , uibutton, label , image view @ center of uiview automatically when alter mode of view either land scape or portrait mode.my mean when alter orientation text field , button , image automatically set in center of view. how set them using interface builder or dynamically?

write code in method

-(bool)shouldautorotatetointerfaceorientation:(uiinterfaceorientation)interfaceorientation { homecoming yes; } -(void)didrotatefrominterfaceorientation:(uiinterfaceorientation)frominterfaceorientation { if (frominterfaceorientation == uiinterfaceorientationlandscapeleft || frominterfaceorientation == uiinterfaceorientationlandscaperight ) { //write code specific orientation } else if(frominterfaceorientation == uiinterfaceorientationportrait || frominterfaceorientation == uiinterfaceorientationportraitupsidedown) { //write code specific orientation } }

iphone uiimageview uibutton uitextfield uiinterfaceorientation

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

c# - Can ProtoBuf-Net deserialize to a flat class? -

javascript - Change element in each JQuery tab to dynamically generated colors -