I have three controllers (FirstVC, SecondVC, ThirdVC) inside storyboad, and navigation is sequential: a user can navigate from FirstVC to SecondVC, and then to ThirdVC. Now,
I use the following snippet to push multiple View Controllers:
extension UINavigationController {
func push(_ viewControllers: [UIViewController]) {
setViewControllers(self.viewControllers + viewControllers, animated: true)
}
// Also had this in here, left it in as a bonus :)
func popViewControllers(_ count: Int) {
guard viewControllers.count > count else { return }
popToViewController(viewControllers[viewControllers.count - count - 1], animated: true)
}
}