I’m scaling an object as below:
CGAffineTransform newTransform =
CGAffineTransformScale(self.graphicView.transform,
(graphicViewSize.width + resizeValue) / graphicViewSize.width,
(graphicViewSize.height + resizeValue) / graphicViewSize.height);
This scales correctly, however it moves the origin position of the view. What is the best way to move it back? Best to do a translate? What is a nice way to do this, is it possible translate and scale at the same time so this happens?
Change the layer’s anchor point property. By default, it is set to the center so the view will scale in all directions, but you can change it to the corners to maintain one of them in a fixed location.