0
votes

Tab bar have three view controllers. and I want to start third view controller of navigation controller when opening the tab bar. When tapping back button on third view controller, move to second view controller.

How to start third view controllers and push first, second view controllers.

It has each segue.

enter image description here

1
This is not a good idea. It is counterintuitive. Why would you not just place the 3rd vc as your first and the 1st as your last?Dinu Nicolae

1 Answers

0
votes

just access your navigation controler and call setViewControllers

let nvc = (tabBarController?.viewControllers?[0] as? UINavigationController)
nvc?.setViewControllers([UIViewController1, UIViewController2, UIViewController3], animated: false)