-
Notifications
You must be signed in to change notification settings - Fork 281
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
how handle left/right swipes? #12
Comments
I meant - is it a more common case that a box can be swiped in only 1 direction? Does it not make more sense to have 4 recongizers attached to the box, and onSwipe to receive as a param the current direction for example? |
MGBox is providing a standard unmodified My preference would be for swipe gesture recognisers to optionally allow multiple swipe directions. I think the way Apple have done it is unnecessarily limiting. But certainly you could get around it by attaching additional recognisers and setting their action to the Alternatively MGBox could be modified to have |
Yeah, same direction of thought that I have ... like for my current project I just attached another gesture recogniser to the same box, but I realized I can't use the same onSwipe block to handle both, because then I don't know which direction the swipe was ... I think onSwipedRight, onSwipedLeft, etc. is the right way |
An idea that just occurred to me, and that hasn't been thought out at all, so might be really stupid, is that all the gesture and tap handlers could be moved to a UIView category, thus decoupling them from MGBox and making them much more broadly usable. Something to think about. Anyway, the next time the onSwipe left/right limitation hits me I'll get that one fixed. It's silly. |
If there's only one swiper attached to a box, how to handle left AND right swipes?
The text was updated successfully, but these errors were encountered: