iPhone - Preventing UIImageView to rotate when switching from vertical to horizontal -


i have app camera overlay.
overlay view have 2 imageviews , 1 view. 1 image view overlay graphic drawing.
image view put taken picture it.
custom view custom drawing.

when iphone in horizontal position when taking photo, displayed photo image view rotated. have big space on both sides of picture.

i've tried put overlayviewcontroller without effect :

shouldautorotatetointerfaceorientation - (bool)shouldautorotatetointerfaceorientation:(uiinterfaceorientation)interfaceorientation {     return (interfaceorientation == uiinterfaceorientationportrait); } 

all view , image view have same params ib (for params common).

how may prevent picture rotate image view when phone not vertical ?

note : must able keep ability auto rotate other views can display in app.

in view controller's willanimaterotationtointerfaceorientation:duration: method, can apply opposite rotation uiimageview's transform property. example, if controller rotating uiinterfaceorientationlandscapeleft, 90° clockwise rotation portrait. if apply 90° counterclockwise rotation image view, seem not have rotated @ all.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -