Marshall
Marshall

Reputation: 1195

Single navigation bar in iOS tabbed app

I'm doing iPhone tabbed application, but I need to use navigation bar also (just for app title and single icon for Settings in the corner) like twitter did: link. I have 4 tabs in my app too. I was wondering is there any chance to create only one navigation bar, so when I want to change it, I will change it only in one place?

I was looking at this tutorial, but there are two "Navigation Bar" objects. And I would like to have single object that will appear in every tab.

Right now I created tabbed app and manually added navigation bar item into first tab. Then I copied it into others. It works ofc, but I'm not sure about that solution:/

Upvotes: 2

Views: 647

Answers (1)

Jonathan Arbogast
Jonathan Arbogast

Reputation: 9650

Your use of separate navigation controllers for each tab isn't a bad solution.

Setting up the navigation bar and its items in only one place is also a good idea. To achieve this, you could always have your view controllers derive from a custom view controller that overrides navigationItem.

Upvotes: 1

Related Questions