iOS scroll event not firing as often when finger is off of the screen

笑着哭i 提交于 2019-12-11 02:45:47

问题


I have written an efficient parallax script that is very smooth on mobile. However, it is only smooth if I am scrolling with my finger on the screen. When scrolling with my finger on the screen, the parallax is smooth. But the second I take my finger off and let the inertia take over, it starts lagging. But only when the inertia takes over. I'm thinking if there is some kind of scroll event that is fired often during inertial scroll. It does not appear to be the script causing the lag, it is more to do with the fact that the scroll event or whatever scroll event I've tried does not fire as often during inertial scrolling. I've tested this theorem by measuring the amount of time that has passed from one scroll event to another. The result was that scroll events fire no less frequently when parallax is being calculated and applied versus an event where it is not.

Essentially, what I'm asking for is an event that is fired just as many times during inertial scroll as when the finger is on the screen and dragging.

Thanks in advance.

来源:https://stackoverflow.com/questions/27356388/ios-scroll-event-not-firing-as-often-when-finger-is-off-of-the-screen

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!