I am trying to make one of my tabs to be the first screen to show on the start of the app I have 5 view controllers embeded with navigation controllers
how can I choose any of the tabs to start on the view did load ?
I am trying to make one of my tabs to be the first screen to show on the start of the app I have 5 view controllers embeded with navigation controllers
how can I choose any of the tabs to start on the view did load ?
override func viewDidAppear(_ animated: Bool) {
self.tabBarController?.selectedIndex = 2
}
A selected index of 2 will select your third tab.
It's to put in the viewDidAppear if you first ViewController.