如何控制UIPage ViewController的转换速度?

时间:2016-05-24 06:38:21

标签: ios iphone swift uipageviewcontroller

我使用UIPageViewController进行页面卷曲转换。如何控制转换页面速度?

1 个答案:

答案 0 :(得分:1)

您可以使用我认为的自定义动画,

   let animation: CATransition = CATransition()
    animation.delegate = self
    animation.duration = 1.0
    animation.startProgress = 0.2
    animation.endProgress = 1
    animation.type = "pageCurl"
    animation.subtype = kCATransitionFromLeft
    animation.fillMode = kCAFillModeBackwards
    self.view.layer.addAnimation(animation, forKey: "animation")