iphone - How can I avoid changing image view to rotate when device is rotated -
how can avoid changing image view rotate when device rotated. have image view don't want rotate when device orientation changed.
if mean want whole view autorotate, except image view, can manually rotate image view normal whilst else autorotates.
you can in willanimaterotationtointerfaceorientation:duration:
. apply transform view want rotated.
- (void) willanimaterotationtointerfaceorientation:(uiinterfaceorientation)interfaceorientation duration:(nstimeinterval)duration { [uiview beginanimations:@"controlmovement" context:nil]; [uiview setanimationduration:duration]; if( interfaceorientation == uiinterfaceorientationportrait || interfaceorientation == uiinterfaceorientationportraitupsidedown ) { myimageview.transform = cgaffinetransformidentity; } else { myimageview.transform = cgaffinetransformmakerotation( m_pi / 2 ); } [uiview commitanimations]; }
Comments
Post a Comment