iPhone 两根手指扭转手势
当用户用两根手指扭转图像时,我需要旋转图像。 您知道我如何编写此代码吗?或者您以前是否这样做过。
我认为编写一个检测所有主要手势并提供 iif 的类是个好主意。
I need to rotate an image when the user do a two finger twist on it.
do you have an idea on how i can code this or if you've done this before.
I think it would be a good idea to write a class that detect all the main gesture and provide iif.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我在互联网上找到了这个例子。写得非常好...
http://www.skylarcantu。 com/blog/2009/08/08/multitouchsingletouchtap-handling/
I found this example on the internet. It's very nicely written...
http://www.skylarcantu.com/blog/2009/08/08/multitouchsingletouchtap-handling/
当您顺时针旋转拇指和食指时,实际发生的情况是:
u
形状,如果您查看完整的手势,它是
.)
顺时针旋转。在某些情况下,指数会稍微向东南移动,因此您会得到/)
。When you rotate your thumb and index clockwise what really happens is that:
u
shape underneath the indexIf you look at the full gesture it is
.)
rotated clockwise. In some cases, the index will move slightly south-east so you get/)
.我建议研究 SDK 3.2 - 它扩展了对手势检测的支持。
I suggest looking into SDK 3.2 - it has extended support for gesture detection.