CGAffineTransformRotate in viewDidLoad doesn't work

Discussion in 'iOS Programming' started by Tex-Twil, May 3, 2011.

  1. macrumors 68020

    Tex-Twil

    Joined:
    May 28, 2008
    Location:
    Europe
    #1
    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
     
  2. thread starter macrumors 68020

    Tex-Twil

    Joined:
    May 28, 2008
    Location:
    Europe
    #2
    Here is how the picture should look like :

    [​IMG]

    and here is how it actually looks:

    [​IMG]

    it looks like the image is stretched into a wrong direction :(
     

Share This Page