-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Swipe gesture return null direction value on IOS #40
Comments
I found the following workaround:
you can do similar logic to swiping left/right, just note the troubles of determining wether it was a horizontal or vertical swipe (you can use threshold from config) |
@ReallyLiri works for me. I have handlers for swipe left and right. In addition, if direcciont === null in onSwipe, then I make an attempt to derive user intention as per your suggestion. onSwipe={ (direction, state) => {
const {dx} = state;
if (direction === null){
if (dx > 0) {
console.log('swipe right');
}
else if (dx < 0) {
console.log('swipe left');
}
}
} } I do feel that the UX is better this way. |
I wrote some code in this issue #52 which might help these problems :) |
Here is the detail
Gatting null direction in starting 3-4 attempt
The text was updated successfully, but these errors were encountered: