In my iOS application, I use UITouchGestureRecognizer to drag/drop, zoom and rotate UIImageView. I also store the information on the last position of the ImageView to retrieve it when the app restarts.

That was working well with iOS7 but I have recently started to test with iOS8 and I'm facing some issues, especially with the zoom. Whenever the imageview has a non-0 angle in the rotation parameter, the zoom is not acting like expected and reduces the size of the image.

I don't understand why the OS change does that, here is my code:

```
-(void) viewDidAppear:(BOOL)animated{
    [super viewDidAppear:YES];
    [self loadAllImages];
    for (GIFavorite *favorite in self.favorites){
        UIImage *image = favorite.image;
        ImageView *imageView = [[ImageView alloc] initWithFrame:CGRectMake(0, 0, image.size.width, image.size.height)];
        imageView.center = CGPointMake(favorite.x, favorite.y);
        imageView.transform = CGAffineTransformMakeRotation(favorite.rotation);
        imageView.transform = CGAffineTransformScale(imageView.transform, favorite.scale, favorite.scale);
        imageView.image = image;
        imageView.userInteractionEnabled = YES;
        UIPanGestureRecognizer * panRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(handlePan:)];
        panRecognizer.delegate = self;
        [imageView addGestureRecognizer:panRecognizer];
        UIRotationGestureRecognizer * rotationRecognizer = [[UIRotationGestureRecognizer alloc] initWithTarget:self action:@selector(handleRotate:)];
        rotationRecognizer.delegate = self;
        [imageView addGestureRecognizer:rotationRecognizer];
        UIPinchGestureRecognizer * pinchRecognizer = [[UIPinchGestureRecognizer alloc] initWithTarget:self action:@selector(handlePinch:)];
        pinchRecognizer.delegate = self;
        [imageView addGestureRecognizer:pinchRecognizer];
        [self.view addSubview:imageView];
    }
}

```

I guess the way I am doing the transforms is wrong because when I put the `CGAffineTransformMakeRotation` instruction after the `CGAffineTransformScale` instead of reducing the size it increases it.

Where am I doing things wrong?

Edit: the code for handleRotate

```
- (void)handleRotate:(UIRotationGestureRecognizer *)recognizer {
    recognizer.view.transform = CGAffineTransformRotate(recognizer.view.transform, recognizer.rotation);
    ImageView *imageView = recognizer.view;
    CGFloat radians = atan2f(imageView.transform.b, imageView.transform.a);
    favorite.rotation = radians;
    recognizer.rotation = 0;
}

```