This will also work. Just move the image to the center of the pinch, scale it and then back to its position in just one transform.
- (void) pinch:(UIPinchGestureRecognizer *) recognizer {
CGPoint anchor = [recognizer locationInView:imageToScale];
anchor = CGPointMake(anchor.x - imageToScale.bounds.size.width/2, anchor.y-imageToScale.bounds.size.height/2);
CGAffineTransform affineMatrix = imageToScale.transform;
affineMatrix = CGAffineTransformTranslate(affineMatrix, anchor.x, anchor.y);
affineMatrix = CGAffineTransformScale(affineMatrix, [recognizer scale], [recognizer scale]);
affineMatrix = CGAffineTransformTranslate(affineMatrix, -anchor.x, -anchor.y);
imageToScale.transform = affineMatrix;
[recognizer setScale:1];
}