(I’m currently only interested in iOS behaviour)
I’m importing ScrollView
from react-native, and would like to detect when scrolling occurs, namely it’s dragging, and finishes dragging.
<ScrollView
onScrollBeginDrag={() => {
console.log('dragging');
}}
onScrollEndDrag={() => {
console.log('finished');
}}
>
This works completely fine, except for one use case: if the user scrolls and then tap with the finger to stop the scrolling (instead of just lifting the finger), then the onScrollEndDrag
will trigger but the single tapping used to stop the scrolling will actually trigger another scrolling event, meaning the onScrollBeginDrag
will trigger, and immediately after, onScrollEndDrag
will trigger again.
Is it possible to prevent that second chain of scroll? When the user taps to stop the scrolling, I don’t want it to count as another scrolling event.