Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UINavigationController within a UITabBarController, setting the navigation controller title

In my app I have a UINavigationController within a UITabBarController. Everything is working fine, however I can't set the title for the navigation controller. I have tried several different methods and googled around but there seems to be no solution for this problem.

Any Help would be greatly appreciated.

Thankyou in advance.

Sam

like image 518
shoughton123 Avatar asked Mar 05 '12 15:03

shoughton123


People also ask

What is Uinavigationcontroller for?

A navigation controller is a container view controller that manages one or more child view controllers in a navigation interface. In this type of interface, only one child view controller is visible at a time.

What is the navigation controller?

NavController manages app navigation within a NavHost . Apps will generally obtain a controller directly from a host, or by using one of the utility methods on the Navigation class rather than create a controller directly. Navigation flows and destinations are determined by the navigation graph owned by the controller.


1 Answers

I found the answer in the end, it was:

self.tabBarController.navigationItem.title = @"title";
like image 65
shoughton123 Avatar answered Sep 18 '22 18:09

shoughton123