UIRotationGestureRecognizer最小旋转值

发布于 2024-09-05 07:42:02 字数 291 浏览 2 评论 0原文

是否可以设置 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

疧_╮線 2024-09-12 07:42:02

不,没有这样的方法。

但是,您可以检查 手势识别器的.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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文