UIRotationGestureRecognizer最小旋转值
是否可以设置 UIRotationGestureRecognizer
转换为 UIGestureRecognizerStateRecognized
所需的最小旋转值?我正在使用多个识别器,并且我的 UIRotationGestureRecognizer
不断以非常小的旋转(任一方向 1 到 15 度之间)而不是我的 UIPinchGestureRecognizer
被调用。
我想做的是,仅当旋转在一定范围内时才调用旋转,否则取消旋转并调用捏合。
Is it possible to set a minimum rotation value necessary for a UIRotationGestureRecognizer
to transition into UIGestureRecognizerStateRecognized
? I'm using multiple recognizers, and my UIRotationGestureRecognizer
keeps getting called with a very small rotation (Between 1 and 15 degrees either direction) rather than my UIPinchGestureRecognizer
.
What I'd like to do is only have the rotation be called if the rotation is within a certain range, otherwise cancel it and let the pinch be called.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不,没有这样的方法。
但是,您可以检查 手势识别器的
.rotation
属性,并确定是否需要执行任何操作。No there isn't such a method.
However, you can check the
.rotation
property of the gesture recognizer, and determine if you need to take any actions.