为 UITouch 实例计时

发布于 2024-11-25 20:35:00 字数 114 浏览 3 评论 0原文

我有一个带有用于点击或滑动的手势识别器的 UIView,但我希望能够对用户触摸时间进行计时,如果它大于某个时间值,我想触发另一种方法。

UITouch手势的时间是如何获取的?

谢谢

I have a UIView with a gestureRecognizer for a tap or a slide, but I want to be able to time the users touch time and if it is larger than a certain time value I want to trigger another method.

How is the time of a UITouch gesture accessed?

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

负佳期 2024-12-02 20:35:00

UITouch 的时间戳属性可能就是您想要的。

 [touch timestamp]

The timestamp property of UITouch is probably what you want.

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