• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: (newbie) help with combining navigation controller and tab bar controller
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (newbie) help with combining navigation controller and tab bar controller


  • Subject: Re: (newbie) help with combining navigation controller and tab bar controller
  • From: Jonathan Hess <email@hidden>
  • Date: Fri, 5 Jun 2009 11:25:16 -0700

Hey Beth -

You should be able to drag a navigation controller from IB's Library directly into the on screen editor (window) for the UITabBarController. Assuming you started with the default tab bar controller, at this point you will have produced a document with this structure:

MainWindow.xib
File's Owner
First Responder
UIWindow
UITabBarController
	UINavigationController
		UITabBarItem
		UIViewController (Root View Controller For Navigation Item)
			UINavigationItem
	UIViewController (View Controller For Second Tab)
		UITabBarItem

Good Luck -
Jon Hess

On Jun 5, 2009, at 10:18 AM, Beth Freeman wrote:

Hi,I'm just learning Cocoa.

I need to build an app that has a navigation controller and a tab bar
controller. Similar to the Huffington Post app: the initial view for the
tab bar will be a table view, and each row in the table view will open up a
detail view, and of course the nav bar at the top will allow the user to go
back to the table view.


What I can't figure out is how to put a navigation controller and a tab bar
controller into the same view.


I started with a tab bar controller, and got all the views hooked up just
fine. Then I dragged in a navigation controller, but it creates a whole
separate window. I want the navigation and the tab bar in the same window.


I haven't been able to find any examples online that show how to do this.
I'm attaching a file that is a snapshot of my IB windows for the tab bat
controller nib (Main Window.xib). You can see how I added a navigation
controller, and it created a separate window, with a separate view. I'm
also showing the nib file for the first tab, the topics view (which
corresponds to the TopicsTableViewContoller).


Any help in understanding how to combine navigation and tab bar controllers
in the same window, or pointers to examples of this would be much
appreciated.


Thank you!

Elisabeth
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >(newbie) help with combining navigation controller and tab bar controller (From: Beth Freeman <email@hidden>)

  • Prev by Date: Re: get a window in front by clicking on a menu item
  • Next by Date: Re: How to lock an object?
  • Previous by thread: Re: (newbie) help with combining navigation controller and tab bar controller
  • Next by thread: Re: (newbie) help with combining navigation controller and tab bar controller
  • Index(es):
    • Date
    • Thread