UITabBarController - transition from one tab's navigation stack to a view controller of another tab's navigation stack <p>Novice iOS developer here. I am making a simple tabbed chat application in Swift using a UITabBarController. For simplicity, let's assume the application only has two tabs, "Contacts" and "Chats". Each of the two tabs has a navigation controller. </p> <p>The "Chats" navigation stack begins with a UITableViewController called "ChatsTableViewController" which lists the user's chats. When the user selects a chat, the app segues to a MessagesViewController which displays the messages for the selected chat.</p> <p>The "Contacts" navigation stack includes a UITableViewController which lists the user's contacts. Upon selecting a contact, another view controller is presented modally, asking the user whether they would like to begin a chat with the selected contact, and giving them the option to cancel. If the user chooses to begin a chat, I would like to transition from this modal view controller to the MessagesViewController of the "Chats" tab, passing the information necessary to display the chat (which I have at the ready in the modal view controller).</p> <p>When the MessagesViewController loads, regardless of whether we get to it by selecting a chat from the "Chats" tab or by creating a new chat from the "Contacts" tab, it should have a navigation bar at the top with a "Back" button that takes the user to the ChatsTableViewController.</p> <p>I have done a good deal of searching, but have not found any solutions that fit what I need. Any suggestions would be greatly appreciated! Here is a summary of what I am looking for.</p> <ol> <li>Standard way to perform a transition from a view controller in one tab's navigation stack to a view controller (that is not the root view controller in my case) of another tab's navigation stack, while passing relevant information to display in the destination view controller.</li> <li>The view controller I transition to should have a navigation bar with a back button that takes the user to the previous view controller in its navigation stack, just as if they had accessed it from the normal navigation flow of the tab.</li> </ol> <p><strong>EDIT</strong>: I've found that you can easily switch tabs programmatically using <code>self.tabBarController?.selectedIndex = index_of_tab_to_switch_to</code>, however, this takes me to the first view of the tab and I am still unsure of how I can pass data. Any thoughts on how I can proceed? </p>