【问题标题】:UITableviewCell appearance animation like card flip in swift?UITableviewCell 外观动画,如快速翻转卡片?
【发布时间】:2018-03-28 09:40:31
【问题描述】:

我已经做了一些UITableviewCell 外观动画,例如从left/right/top/bottom 出现。

但现在我正在进行的项目中有一个新要求,即显示UITableViewCell,就像卡片翻转一样。我该怎么做?

【问题讨论】:

    标签: swift xcode uitableview uiviewanimation


    【解决方案1】:

    我在我的一个项目中使用过如下。希望这对您也有帮助。

    翻转单元格

    UIView.transition(with: contentView, duration: 0.6, options: .transitionFlipFromRight, animations: {() -> Void in
            self.contentView.insertSubview(flipView, aboveSubview: normalView)
        }, completion: {(_ finished: Bool) -> Void in
    })
    

    【讨论】:

    • UITableviewCell的情况下如何使用这组代码?
    • 您可以放入按钮操作或根据您的要求。
    • 这里的 flipview normalview contentview 是什么?
    • 您必须在 ContentView 中放置 2 个视图 FlipView 和 normalView。当你翻转它会显示 normalView。当您翻转视图时,它会显示 normalView
    猜你喜欢
    • 2013-11-22
    • 2014-03-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-10-20
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多