IPhone two fingers twist gesture

我只是一个虾纸丫 提交于 2019-12-08 02:15:36

问题


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.


回答1:


I found this example on the internet. It's very nicely written...

http://www.skylarcantu.com/blog/2009/08/08/multitouchsingletouchtap-handling/




回答2:


When you rotate your thumb and index clockwise what really happens is that:

  • the thumb starts on the right
  • descrives a u shape underneath the index
  • finishes on the left

If you look at the full gesture it is .) rotated clockwise. In some cases, the index will move slightly south-east so you get /).




回答3:


I suggest looking into SDK 3.2 - it has extended support for gesture detection.



来源:https://stackoverflow.com/questions/2442964/iphone-two-fingers-twist-gesture

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!