I am using a code snippet like this:
componentDidMount() {
this.state.scrollY.addListener((value) => this.handleScroll(value));
}
handleScroll(pullDownDistance) {
//pull down distance knows how much you pulled
}
To detect when a user is attempting to scroll. the 'pullDownDistance' variable will give you the distance of each pull down.
I am trying to emulate something like the gif implemented below:
Something like this gif: https://github.com/LennyBoyatzis/RN-Pull-To-Refresh-Gears/blob/master/images/giphy.gif
Where it is possible to pull the scroll view in the opposite direction, and then it will reload. I can't seem to get the view to detect any sort of 'pull down in the opposite direction, as the pulldown function (handleScroll) does not seem to be executed.
is there a way to detect scrolls in that direction?