Headings that do not appear in the ViewControllers navigation bar

I am currently using the storyboard interface builder to develop my GUI.

My structure is as follows in a storyboard

-> Navigation Controller -> Tab Bar Controller -> SomeViewController -> AnotherViewController 

The navigation bar and the tab bar are displayed perfectly in ViewControllers, and the headers are set and visible in the editor, but the names disappear in the simulation.

How to solve this problem?

FYI: Navigation Controller and Tab Bar Controller not tied to any arbitrary class.

+8
ios storyboard uinavigationcontroller
source share
2 answers
 self.navigationController.navigationBar.topItem.title = @"YourTitle"; 

Simply put, in viewDidAppear in your ViewControllers.

+25
source share

You can also use this code.

 self.navigationController.topViewController.title=@"YourTitle"; 

type inside viewDidAppear or viewWillAppear

+8
source share

All Articles