Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Tex-Twil

macrumors 68030
Original poster
May 28, 2008
2,501
15
Berlin
Hello,
I need to rotate a UIImageView of a view created by Interface builder. I have this code:

Code:
- (void)viewDidLoad
{
    [super viewDidLoad];
    image.transform = CGAffineTransformRotate(image.transform, REF_INIT_OFFSET*M_PI/180); 
}

This rotates the image but the latter is totally distorted. if REF_INIT_OFFSET is a multiple of 90 it works fine !


Do you have in idea what's wrong ?

thanks,
tex
 
Here is how the picture should look like :

Screen%20shot%202011-07-04%20at%208.32.11%20PM.png


and here is how it actually looks:

Screen%20shot%202011-07-04%20at%208.32.32%20PM.png


it looks like the image is stretched into a wrong direction :(
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.