快速转动动画180度

时间:2016-04-21 01:56:03

标签: swift animation

我在向上滑动时使用卷曲动画,这使得卡片飞到顶部 - 它工作正常。我想使用相同的动画,但要向下滑动,以便卡片飞走。我想我必须以某种方式将动画向上滑动180度。这可能吗?

let views = (frontView: self.frontView, backView: self.frontView)

    // set a transition style
    let transitionOptions = UIViewAnimationOptions.TransitionCurlUp

    UIView.transitionWithView(self.flashCardView, duration: 0.5, options: transitionOptions, animations: {
        views.frontView.removeFromSuperview()
        self.flashCardView.addSubview(views.frontView)
        }, completion: { finished in
            // any code entered here will be applied
    })

1 个答案:

答案 0 :(得分:0)

UIViewAnimationOptions结构有另一个选项可以解决这个问题:

let transitionOptions = UIViewAnimationOptions.TransitionCurlDown