我可以预先知道它在滚动浏览之前停止的位置是否停止滚动
我可以提前知道滚动浏览在滚动停止之前将停止的位置吗?我已经咨询了相关的在线材料,但似乎没有相关的话题。我正在制作一个魔术应用程序,以知道在滚动浏览之前将在哪里滚动,以便我可以提前修改该值
:在开始放慢速度和停止时标记,但是它们之间的滑动距离尚不确定,所以我还没有结束我的想法
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有一个滚动视图委托法。
这将告诉您减速时的预期目标偏移。
它旨在用于更改目标偏移。例如,如果要确保它与完成的内容保持一致。
但是您不必更改它。您可以将目标偏移返回,但可以像您提到的那样更改内容。
There is a scroll view delegate method.
https://developer.apple.com/documentation/uikit/uiscrollviewdelegate/1619385-scrollviewwillenddragging
This will tell you the intended target offset when the deceleration finishes.
It is intended to be used to change the target offset. For instance if you want to make sure it aligns with the content you have tween it finishes.
But you don’t have to change it. You can just return the target offset but use that to change the content like you mentioned.