The short answer is that any view inside your tab bar controller that you want to have navigation, you set the tab bar controller's viewController for that view to be an instance of UINavigationController. The following should help you.

http://developer.apple.com/iphone/library/featuredarticles/ViewControllerPGforiPhoneOS/CombiningToolbarandNavigationControllers/CombiningToolbarandNavigationControllers.html#/ /apple_ref/doc/uid/TP40007457-CH8-SW1

Luke

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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/luketheh%40apple.com

This email sent to luket...@apple.com

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to