user4707997
user4707997

Reputation: 37

How do I create a back button when connecting a tab bar view to a view controller

I have a tab bar view that connects my view controllers through the tabs at the bottom, however i want one of my view controllers to have buttons which lead to new new pages within it however when I do this the new view controller opens with the information on it, but there is no back button even when i embed a navigation controller

Im new to swift and am just looking a bit of help with this issue

Upvotes: 1

Views: 321

Answers (1)

Ty Victorson
Ty Victorson

Reputation: 277

Make sure you are starting the application through the navigation controller, that is the only way to have the back button as you wanted, to carry to every ViewController. Then once you do that, any button on any of your ViewControllers will have a back button on the navigation bar at the top.

as shown here the bar at the top will be where the back button will be

Where the plus button is on the bar at the top on my Nav bar, is where your back button will appear.

if you have any questions please feel free to leave a comment!

Upvotes: 1

Related Questions