开发者

Is it possible to detect the rotation of a single finger on the iPhone?

开发者 https://www.devze.com 2023-02-02 02:08 出处:网络
Is it possible to detect the rotation of a single finger in an iPhone application?I\'m looking for rotation about a point, not rotation by moving the f开发者_如何学Goinger horizontally or vertically.A

Is it possible to detect the rotation of a single finger in an iPhone application? I'm looking for rotation about a point, not rotation by moving the f开发者_如何学Goinger horizontally or vertically.


Assuming that the case you have in mind is when you set down a single finger and rotate it in place, then the answer is pretty much no. The only data you receive from the OS is (x,y) coordinates for each touch. (The OS has a little more to work off of -- in the private CoreScreen framework, you can I believe get some more detailed contact information, but it is not entirely clear how that would help.)

A rotating finger is likely to exhibit a little bit of wobble as it rotates, so you could perhaps attempt to find some pattern of wobbling that corresponds to rotation, but it is likely not to be very accurate.

0

精彩评论

暂无评论...
验证码 换一张
取 消