Closed gerardo-navarro closed 8 years ago
One of possible solutions could be disabling/enabling user interactions on kolodaView for particular cards.
Thanks for the answer. This is a valid solution as long as the card is not being dragged.
However, I refer to the situation where the card is being dragged and I'd like to decide whether it can swiped away completely or not.
@gerardo-navarro That's a good idea! I'll implement it )
@AEugene I added this to my PR #131 as I needed to use that in a project, you can extract the relevant part into the code if you'd like.
I would also be interested in preventing the cards from moving at all. In my own case I would like to keep the "tapped card" event enabled, but prevent the cards from moving
I needed this for my own project so I opened a pull request. I wanted to preserve user interaction on the card itself and preserve the built in "tapped card" event, but prevent the card from moving at all until certain conditions were met.
Hi Guys,
I'd like to be able to decide whether a card can be swiped or not. I expected to find something, but could not find it in the current version 2.0.10:
func koloda(koloda: KolodaView, shouldBeSwipedCardAtIndex index: UInt, inDirection direction: SwipeResultDirection) -> Bool
Do you have some suggestions for how to implement this with the current implementation?
Cheers Gerardo