I have 6 uiimage plates which are placed on the view. Now I am rotating the images 90 degrees on double tap by using the below code:
CGAffineTransform transform = CGAffineTransformMakeRotation(M_PI * 0.5);
plate.transform = transform;
For first double tap it rotates 90 degree but when double tap second time it doesn’t rotate.
Am i missing something ? Thanks in advance.
AffineTransformkeeps the data of the transformation saved. So if youscale/rotate/movethe view, theAffineTransformwill keep that info.In order to rotate 90 degree each time, you will have to
getthe current value and then modify it, or just keep a variable of your current degree and change the variable.