Pavel
Pavel

Reputation: 11

didSwipedCardAtIndex Koloda pod didn't work

Good afternoon guys!

No one can help me - I have this problem on the pod 'Koloda', '4.6' version and I don’t know what to do.

didSwipeCardAtIndex not called by delegate. Previously, on swift 2 everything worked fine. Now Swift 3 & 4 Sample didn't call func too... https://github.com/Yalantis/Koloda

func koloda(koloda: KolodaView, didSwipedCardAtIndex index: UInt, inDirection direction: SwipeResultDirection) {
    //
}

Thanks for all

Upvotes: 0

Views: 117

Answers (1)

Amit parmar
Amit parmar

Reputation: 1

You can use this function in swift 4

func koloda(koloda: KolodaView, shouldSwipeCardAtIndex index: UInt, inDirection direction: SwipeResultDirection) -> Bool {

        if direction == SwipeResultDirection.left || direction == SwipeResultDirection.right {
            return true
        }

        return false
    }

Upvotes: 0

Related Questions