Bruno Vavretchek
Bruno Vavretchek

Reputation: 53

How do I perform a clean navigation between screens?

I gotta create a UITabbarController and also Embed In a UINavigationController, to create a nice navigation system with TopBar and also the BottomBar. However, I feel I'm doing something wrong, because when I run the app I can't see the UITabBar with my two screens as options to navigate through. Can you guys take a look please?

Storyboard:

enter image description here Simulator 1

enter image description here

Simulator 2

enter image description here

That's how the UITabBar should looks like:

enter image description here

enter image description here

Upvotes: 0

Views: 59

Answers (2)

Shehata Gamal
Shehata Gamal

Reputation: 100533

This is the correct structure

You have

1- Add another VC embed in a navigation

2- Control-drag from the tabBar to that UINavigationController and select viewControllers

enter image description here

//

And you will get this

//

enter image description here

Upvotes: 2

Do2
Do2

Reputation: 1791

What you want is this:

TabBar -> Navigation Controller -> 1st ViewController with the tableView

TabBar -> Navigation Controller -> 2nd ViewController

but what you have is this:

TabBar -> Navigation Controller -> 1st ViewController with the tableView -> 2nd ViewController

Add another Navigation Controller connect it to the Tab Bar Controller (relationship segue: view controllers), now connect your second view controller to the Navigation Controller (relationship segue: root view controller)

Upvotes: 1

Related Questions