1
votes

I'm trying to show the navigation bar from the navigation controller in Swift. I'm linking to a view through a segue from a modal view. For some reason, the navigation isn't showing in the view. How do I achieve this? The sidebar view controller is presented modally from the root view controller. I've posted a screenshot of my storyboard below.

enter image description here

2

2 Answers

0
votes

I am confused as to what your UI stack looks like. I am not seeing your UINavigationController. Can your clarify your stack more.

What is presenting your My Profile view control and then what presents your Side Bar View Controller? Where are you expecting to see a navigation bar?

0
votes

When you segue to a UIViewController model it will not take the UINavigationController with it. If you want a navigation bar there you should add it to that view, but then you should think about why you present that view modal and not just push it on the stack?

When you push the viewcontroller on the stack it will take the navigation bar. When you want this behaviour you should choose the "Show" segue.