views:

19

answers:

0

Here's my situation:

  • I have a UITabBarController that presents several UINavigationControllers when it's buttons are pressed (done through Interface Builder)
  • the UINavigationControllers have UINavigationBars (their 'Shows navigation bar' is ticked in IB)
  • on the navigation controllers I programmatically push UIViewControlleres with custom UIViews build with IB that have the Top Bar property set to 'Navigation Bar'; to my understanding this simply adjusts the view's content to leave space for that item

Now, on some of these views I need to add a right button (the Bar Button item from IB's library).

When I run the code I can see the navigation bar on top of all my views and can set it's title from their respective controllers. However Interface Builder does not 'see' the navigation bar for these xibs and cannot add buttons to it.

How can I customize the navigation bar from these secondary views? Can I add a new navigation bar from the library and somehow link it with the original navigation bar?