alexbrillant / react-native-deck-swiper

tinder like react-native deck swiper
ISC License
1.56k stars 465 forks source link

Swipe Back Card #3

Closed onehassan closed 7 years ago

onehassan commented 7 years ago

How can I add a swipe back functionality?

alexbrillant commented 7 years ago

It is not implemented yet, but I have thought about it. You can submit a pull request with this feature if you like. Otherwise, I will implement it when I have time.

alexbrillant commented 7 years ago

I added a swipeBack method to the component.

SwipeBack configuration props : https://github.com/alexbrillant/react-native-deck-swiper#swipe-back-animation-props

swipeBack component method : https://github.com/alexbrillant/react-native-deck-swiper#methods

I also added a method to jumpTo a card at a given index.

Check out the demo for a working exemple : https://github.com/alexbrillant/react-native-deck-swiper/blob/master/Exemples/App.js

Thanks for your suggestion 👍