Jacek Kwiecień
Jacek Kwiecień

Reputation: 12637

NAvigation bar doesn't appear

I'm developing a storyboard app with UITabBarController.

I want a UINavigationBar on one of the tab ViewControllers. I set the property Black NavigatonBar in ViewController property, and also drag navigationItem to this view.

NavigationBar is not visible in the viewVontroller when I run the app

Upvotes: 1

Views: 1900

Answers (1)

Jon Hess
Jon Hess

Reputation: 14247

It sounds like you're changing the pop up in the simulated metrics inspector. That inspector allows you to tell Xcode about things that will exist in your app that don't exist in the storyboard.

It sounds like you want to add a navigation controller into the storyboard to wrap one of the view controllers in your tab controller. You can do that in the editor menu by choosing the "Embed in" menu, and then choosing "Navigation Controller".

Choosing that item will insert a new navigation controller, make the selected view controller the root of the navigation controller, and re-route any segues that used to point at the selected to controller to point at the navigation controller instead.

Upvotes: 3

Related Questions