So I need to apply some scaling and some rotation to a view (I do this using gestures), so for each gesture I update the current scalling and rotation values with something
You should start from your current transformed state and apply transformation which is expected. Also you can have a look at CGAffineTransformConcat
, it will make it a single transform before applying.
CGAffineTransform transform = yourView.transform;
transform = CGAffineTransformConcat(CGAffineTransformScale(transform, self.scaleWidth, self.scaleHeight),
CGAffineTransformRotate(transform, self.rotationAngle));
yourView.transform = transform;
Hope it helps!