首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >didSwipedCardAtIndex Koloda pod不工作

didSwipedCardAtIndex Koloda pod不工作
EN

Stack Overflow用户
提问于 2019-01-25 08:57:09
回答 1查看 79关注 0票数 0

大家下午好!

没有人可以帮助我-我在'Koloda','4.6‘版本的pod上遇到了这个问题,我不知道该怎么办。

委托未调用didSwipeCardAtIndex。之前,在swift 2上,一切运行正常。现在Swift 3&4 Sample也没有调用func ...https://github.com/Yalantis/Koloda

代码语言:javascript
复制
func koloda(koloda: KolodaView, didSwipedCardAtIndex index: UInt, inDirection direction: SwipeResultDirection) {
    //
}

感谢所有人

EN

回答 1

Stack Overflow用户

发布于 2020-01-20 20:21:05

您可以在swift 4中使用此函数

代码语言:javascript
复制
func koloda(koloda: KolodaView, shouldSwipeCardAtIndex index: UInt, inDirection direction: SwipeResultDirection) -> Bool {

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

        return false
    }
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/54357597

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档