UINavigationController.setViewControllers() animation

When one replaces the rootViewController of a UINavigationController by using the

setViewControllers([newVC], animated: true) method the default animation behavior is to slide the new viewController in frome the right (as if it were a push).


Is there anyway to customize the behavior?

  • Can I force it to slide from the bottom as done with normal modals?
  • Can I completely customize the animation with a cross dissolve or fade?


I've tried definitely a transition delegate but it does not appear to get called when setViewControllers() is used.

I've also tried things such as setting the modalPresentationStyle.


joey

UINavigationController.setViewControllers() animation
 
 
Q