鉴于以下内容:
let transition = CATransition()
transition.duration = 0.5
transition.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionDefault)
transition.type = kCATransitionMoveIn
transition.subtype = kCATransitionFromTop
navigationController.view.layer.add(transition, forKey: kCATransition)
navigationController.pushViewController(viewController, animated: false)
viewController
从底部过渡到顶部,就像模态过渡/ segue一样。但是,随着视图控制器向上移动,背景开始淡化为黑色(覆盖旧视图)。有没有办法禁止发生淡入淡出?
答案 0 :(得分:0)
回答我自己的问题:你只需更改UIWindow的颜色