UIImageView rotation (NOT the image, but the view)

Posted by Kuko on Stack Overflow See other posts from Stack Overflow or by Kuko
Published on 2010-03-24T08:10:41Z Indexed on 2010/03/24 8:13 UTC
Read the original article Hit count: 465

Filed under:
|
|
|

Hi.

How do I rotate the ImageView ... i'm trying to use landscape mode, and have a problem with accelerometer moving the image ... Because when I work in portrait mode the x of accelerometer is the same as the x of the image ... But when I work landscape, the x of accelerometer is the y of the image, because the ImageView autorotates with the parent View. When I rotate the image with CGAffineTransformMakeRotation(M_PI/2), it rotates only the image in it's ImageView... and the x,y sides stays untouched ... Is there any way to make own class which will extend UIImageView where I will swap the x,y sides of a UIImageView ? Or is there some way to rotate the UIImageView, and not only the image in it?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about SDK