问题
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