Manuel Perera
Manuel Perera

Reputation: 1

Why can not I see the title of navigationitem?

Why can not I see the title of navigationitem? I'm a real novice but my storyboard works like this: Navigation bar -> Tab Bar -> View Controller. In the viewcontroller I can see the tab but not the title of the navigation item.

this is the storyboard

this is on simulator

sorry for my English I'm from Argentina

Upvotes: 0

Views: 108

Answers (1)

matt
matt

Reputation: 535138

The topmost child of the navigation controller is the view controller whose title is shown in the navigation bar. In your project, that child is the tab bar controller. Your tab bar controller has no title, so nothing appears in the navigation bar.

(This is one of many reasons why a tab bar controller inside a navigation controller is bad design. Notice that Apple does not list this configuration as one of the intended ways to use a tab bar controller: https://developer.apple.com/library/archive/documentation/WindowsViews/Conceptual/ViewControllerCatalog/Chapters/TabBarControllers.html#//apple_ref/doc/uid/TP40011313-CH3-SW2)

Upvotes: 2

Related Questions