我想在替换window.rootViewController时进行自定义视图控制器的转换,但是我不知道如何。我可以这样过渡:
UIView.transition(with: window, duration: 0.3, options: .transitionCrossDissolve, animations: {
window.rootViewController = vc
}, completion: { completed in
// maybe do something here
})
但是我想使用UIViewControllerAnimatedTransitioning进行自定义过渡。就像展示或关闭时的自定义动画一样。更改rootViewController时是否创建任何过渡对象?