Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/swift/18.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
以swift将动画旋转180度_Swift_Animation - Fatal编程技术网

以swift将动画旋转180度

以swift将动画旋转180度,swift,animation,Swift,Animation,我在向上刷卡时使用了卷曲动画,这会使卡飞到顶部-效果很好。我想使用相同的动画,但是向下滑动,这样卡就会向下飞走。我想我得把滑动动画调高180度。可能吗 let views = (frontView: self.frontView, backView: self.frontView) // set a transition style let transitionOptions = UIViewAnimationOptions.TransitionCurlUp UIVi

我在向上刷卡时使用了卷曲动画,这会使卡飞到顶部-效果很好。我想使用相同的动画,但是向下滑动,这样卡就会向下飞走。我想我得把滑动动画调高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
    })

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

let transitionOptions = UIViewAnimationOptions.TransitionCurlDown

不,对不起,这只是从上往下翻转卡片。我想让这张卡片飞走飞落。