I am having a problem with my tab bar controller. When I launch my app on my phone the tab bar controller the shows like it is supposed to and show the main page to let you select your drive and length and everything then you tap the continues button and it goes to the price view to show how much you are supposed to pay. But if you tap the back button to go back to the view to select the drive type and length the tab bar controller disappears right now I have the back button set up with just a show segue. How do I fix this problem?
2 ways:
- in the IBAction of the back button, call self.dismiss
@IBAction func btn_CloseWindow(_ sender: Any) {
dismiss(animated: true, completion: nil)
}- if you have created an unwind segue func in the controller where you came from and want to return to,
@IBAction func unwindFromNext(sender: UIStoryboardSegue) {
print("By unwinding")
}control drag from the back button to the exit (at top of viewController) of its own view controller and select the name of the unwind segue you have defined.