开发者

iPhone multi-touch coordinates

I am making an iphone app that uses two fingers to place and scale a platform. I 开发者_JS百科need to find the x & y coordinates of BOTH of these touches. How would I go about this. thanks you


check touchesBegan, touchesMoved and touchesEnded in your UIView subclass. This is explained in the Apple docs.


You should go through Gesture Recognizers. Gesture Recognizers are a better approach to touchesBegan: and its siblings if you are developing for iOS 3.2 and later. For the purpose of scaling, you can look at UIPinchGestureRecognizer. Also, remember to enable multitouch by setting the view's multipleTouchEnabled to YES.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜