旋转的UIImageView不断 [英] Spin UIImageView continuously

查看:100
本文介绍了旋转的UIImageView不断的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个问题,而试图用球的形象的UIImageView 连续旋转中。我想这个球在其中心轴线持续旋转。
我一直在使用 CGAffineTransform 尝试,但没有奏效。

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 have tried using CGAffineTransform but it didn't work.

请帮帮忙!

推荐答案

如果您使用转换,因为它应该工作:

It should work if you use transforms as:

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

我已经上传了一个有效的解决方案的一些样本code 。添加您的逻辑,自动旋转...

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

这篇关于旋转的UIImageView不断的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆