轻拂手势期间的内容偏移

发布于 2024-08-25 23:15:09 字数 309 浏览 3 评论 0原文

有没有其他人注意到 UIScrollView 的 contentOffset 在轻拂手势期间不会更新?

它仅在轻拂手势完全完成后更新,即轻拂手势完成时。

手指离开屏幕后,滚动视图继续移动,处于减速阶段。但这并没有反映在 UIScrollView 的 contentOffset 中。

有没有办法在轻拂手势的减速部分跟踪 contentOffset 的位置?

我在顶部有一个 OpenGL 层,我希望它随滚动视图移动。不过,似乎无法从滚动视图中获取正确的信息……

有什么想法吗?

谢谢,

迈克尔

Does anyone else notice that the contentOffset of UIScrollView doesnt update during a flick gesture?

It only updates after the flick gesture has totally completed, when the flick gesture is finished.

After the finger has left the screen, the scrollview keeps moving, in the decelerating phase. but this isnt reflected in the contentOffset of the UIScrollView.

Is there a way to track where the contentOffset is during the decelerating part of the flick gesture?

I have an OpenGL layer on top, and i want it to move with the scrollView. Can't seem to get the right info out of the scrollview though...

Thoughts?

thanks,

michael

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

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

发布评论

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

评论(1

无人问我粥可暖 2024-09-01 23:15:09

UIScrollViewDelegate 方法 -scrollViewDidScroll: 在动画期间连续调用。

The UIScrollViewDelegate method -scrollViewDidScroll: is called continuously during animations.

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