1
votes

My app is a tab view app with 4 tabs and the 4th tab works completely different to the other 3 so needs its own navigation controller (see attached image) I have a back button on my Club view controller which segues back to the last view controller with this code:

@IBAction func backButton(_ sender: Any) {

        _ = navigationController?.popViewController(animated: true)

    }

This works perfectly until I go into my 4th tab Fan Chat, Once I login it segues to my Channel List view controller as expected. I've a back button here that will segue to Premiership view controller but now any time I go to click on a club it segues there as expected but the back button no longer works? I think it's because I've jumped between to navigation controllers, but can't figure out how to cure this.

My Storyboards

1

1 Answers

3
votes

You should put your Login view controller inside navigation controller as well. In your situation Channel list view controller is the root view controller. That's why it has no where to go back.

NavigationContoller -> LoginViewContoller -> ChannelListViewController