Spin UIImageView continuously

前端 未结 2 1876
长发绾君心
长发绾君心 2021-01-31 20:27

I am having a problem while trying to rotate UIImageview continuously with a ball\'s image inside. I would like this ball to spin continuously on its center axis. I

2条回答
  •  面向向阳花
    2021-01-31 21:22

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

提交回复
热议问题