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
Post a Comment