It turns out what I want to do is when I came from the 3d shortcut, forcing UITabBarControllerme to select the index, if I do it in the tab bar viewDidAppear(), the problem is that viewDidAppear()my main UIViewControllerEmbedded is not called if I click on the tab bar item again, but then if it is called. This does not happen with the rest of the drivers, I understand why this is not the first one in the list of elements in UITabBarController.
Tab bar controller: (Here it comes)
override func viewDidAppear(_ animated: Bool) {
if goTasks {
self.selectedIndex = 0
} else if goTodo {
self.selectedIndex = 2
} else if goProjects {
self.selectedIndex = 3
} else if goSearch {
self.selectedIndex = 0
}
}
My first UIViewController: (not called by this method)
override func viewDidAppear(_ animated: Bool) {
print("Entry")
}
Is the problem overridemethods? Any solution?
source
share