UIPinchGestureRecognizer的触摸位置 [英] UIPinchGestureRecognizer's touch locations

查看:140
本文介绍了UIPinchGestureRecognizer的触摸位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的iphone应用程序实现缩放手势缩放。问题是,当一个方法被调用时,手势被识别我没有访问触摸事件本身(所以我不能真正得到他们 locationInView: ),我想得到它,以使我的放大中心正确。

I want to implement zooming with pinch gesture in my iphone app. The problem is, in a method that gets called when the gesture is recognized I don't have access to the touch events themselves (so I can't really get their locationInView:) and I would like to get it in order to center my zoom-in properly.

UIPinchGestureRecognizer 类定义中有一个 UITouch * _touches [2]
定义,但我不能从类外面访问它。有什么我可以做,以获得这些数据吗?

In the UIPinchGestureRecognizer class definition there is a UITouch *_touches[2]; defined, but I can't access it from outside of the class. Is there anything I can do in order to get that data?

推荐答案

希望这有助于 UIPinchGestureRecognizer定位两个手指之间的压缩视图

这篇关于UIPinchGestureRecognizer的触摸位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆