card is not swiping on button click
sahabe1 opened this issue · 5 comments
swipe left and swipe right not working on button click
same issue is happening in demo code
I am seeing the same issue
This seems to be happening if you call .swipe()
too quickly...but then it's unusable as the swipe must be delayed to a certain time limit....please fix it
This is caused because isAnimating is true even after the card is already swiped thus blocking fast swipes
I am not facing this issue while I am dragging cards but while the button is tapped. After an investigation in the source code, I found that the increment
method (in KolodaAnimationSemaphore
) is called twice when we call the swipe
method (for eg. kolodaView.swipe(.right)
). I was able to fix the issue by removing the animationSemaphore.increment()
from public func swipe(_ direction: SwipeResultDirection, force: Bool = false)
in KolodaView.swift
file. It will be incremented in the swipedAction
from KolodaView.swift
, so removing this line will avoid the double incrementation.
not wor
I am not facing this issue while I am dragging cards but while the button is tapped. After an investigation in the source code, I found that the
increment
method (inKolodaAnimationSemaphore
) is called twice when we call theswipe
method (for eg.kolodaView.swipe(.right)
). I was able to fix the issue by removing theanimationSemaphore.increment()
frompublic func swipe(_ direction: SwipeResultDirection, force: Bool = false)
inKolodaView.swift
file. It will be incremented in theswipedAction
fromKolodaView.swift
, so removing this line will avoid the double incrementation.
not working bro..