是否可以禁用 CATransition 的背景淡入淡出?

Is it possible to disable background fade of CATransition?

鉴于以下情况:

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 从底部过渡到顶部,就像模态 transition/segue。但是,随着视图控制器向上移动,背景开始淡化为黑色(以覆盖旧视图)。有什么方法可以阻止这种淡入淡出的发生吗?

回答我自己的问题:您只需更改 UIWindow 的颜色