or azran or azran - 2 years ago 116
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!

Answer Source

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...

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download