iOS 9上的窗口层转换在Swift中无法正常工作

时间:2017-02-22 20:17:53

标签: ios swift

下面的代码应该从当前viewcontroller到目标viewcontroller进行自定义转换。它在iOS 10中按预期工作,但在iOS 9上,它将从当前视图控制器转换为,然后在转换动画结束时,它会快速更改为目标viewcontroler。

let transition = CATransition()
transition.duration = 0.3
transition.type = kCATransitionPush
transition.subtype = kCATransitionFromRight
view.window!.layer.add(transition, forKey: kCATransition)
let destVC = self.storyboard?.instantiateViewController(withIdentifier: dest)
present(destVC!, animated: false, completion: nil)

0 个答案:

没有答案