我想知道如何在我的代码中平滑 UITouch
。我能够在我的 UIView
上检测到 UItouch
,但是当我尝试使用 CGAffineTransform
旋转 View 时,它不会平滑旋转。对于这种旋转,我必须在 iPhone 上按下或长按手指触摸。
如何执行平滑旋转,例如 Roambi Visualizer 应用程序。
感谢您的帮助。
最佳答案
transform
是 UIView 的动画属性,因此可以使用 Core Animation 使旋转平滑:
CGAffineTransform newTransform = //...construct your desired transform here...
[UIView animateWithDuration:0.2
animations:^{view.transform = newTransform;}];
关于iphone - 通过触摸平滑旋转 UIView,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5352255/