I have a UIImageView that is an image of the star. The problem is I want the star to rotate when I move it. How can I rotate a UIImageView to make it look like it is spinning for 3 seconds. I want it to spin 720 degrees.
For a very simple approach, you can use
imageView.transform = CGAffineTransformMakeRotation(radianRotation);
where radianRotation
is a float, e.g. 4*pi for 720 degrees. You can play with basic animations and changing the rotation however you like.
However, if you want a more sophisticated solution, then I highly recommend you look at the answers to this related post: how to rotate UIIMageVIew with fix point?
Also, see the myriad related posts linked on the right hand side of your screen. Many have all the code you need (barring going around in a circle twice).