I'm using the tab bar controller template that is packaged with swift. I have embedded the FirstViewController and SecondViewController into a navigation controller. I have added a third ViewController that is accessed by a segue from the FirstViewController. When I'm in the third ViewController and I hit the SecondViewController tab the simulator takes me to the SecondViewController but when I hit the FirstViewController tab, I'm taken back to the third ViewController - I want to go back to the FirstViewController when I select it's tab. What is the way to implement this? Searching through the documentation I think I should be using:
func tabBarController(_ tabBarController: UITabBarController,
shouldSelectViewController viewController: UIViewController) -> Bool