I got a button and want to rotate the image inside it:
self.DashButton.imageView.transform = CGAffineTransformMakeRotation(M_PI);
The image is a up-arrow to down-arrow after user click it When clicking the button again, I want the down-arrow rotate to up-arrow again, but it is the same counterclockwise rotation, but I just want the arrow reverse back to up-arrow
rotate back code:
self.DashButton.imageView.transform = CGAffineTransformIdentity;
I tried
self.DashButton.imageView.transform = CGAffineTransformMakeRotation(-M_PI);
What I want is not rotate the full circle, just 180 rotate and -180 rotate, not a 360 full rotate