dobiho
dobiho

Reputation: 1035

how to start third view controller of navigation controllers on tab bar in storyboard

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

Upvotes: 0

Views: 99

Answers (1)

SPatel
SPatel

Reputation: 4946

just access your navigation controler and call setViewControllers

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

Upvotes: 0

Related Questions