使用 UIPanGestureRecognizer 旋转视图
是否可以使用 UIPanGestureRecognizer 旋转视图?我想要与旋转手势类似的功能,但只需一根手指。
谢谢。
Is it possible to rotate a view using a UIPanGestureRecognizer? I would like similar functionality to the rotation gesture but with only one finger.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
查看
CGAffineTransformMakeRotation
。这个网站应该有帮助。
http://chris-software.com/index .php/2009/04/26/animations-and-transformations/
来自站点:
Check out
CGAffineTransformMakeRotation
.This website should help.
http://chris-software.com/index.php/2009/04/26/animations-and-transformations/
From site:
当然。但当然,您需要自己进行旋转数学计算。如果您已经有了视图的旋转“中心点”,那么这特别有用,因为您可以跟踪触摸输入相对于该中心的角度,并应用视图的
transform
属性(或其他)当它更新时。Sure. But you'll need to do your own rotation math, of course. If you have a "center point" of rotation for the view already, that's especially useful, as you can track the angle of the touch input relative to that center, and apply the
transform
property of the view (or whatever) when it updates.