or azran or azran - 6 months ago 31
iOS Question

Spin UIImageView continuously

I am having a problem while trying to rotate

continuously with a ball's image inside. I would like this ball to spin continuously on its center axis.
I have tried using
but it didn't work.

Please help!


It should work if you use transforms as:

itemToRotate.transform = CGAffineTransformRotate(itemToRotate.transform, currentAngle);

I've uploaded some sample code of a working solution. Add your logic to rotate it automatically...