iosswiftuinavigationcontrollerpushviewcontrollercatransition

Is it possible to disable background fade of CATransition?


Given the following:

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 transitions from the bottom to the top just like a modal transition/segue. However, as the view controller makes its way up, the background begins to fade to black (to cover the old view). Is there any way to disable that fade from occurring?


Solution

  • Answering my own question: You just change the colour of the UIWindow