Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 06-23-2009, 06:19 AM   #1 (permalink)
New Member
 
Join Date: Jun 2009
Posts: 2
Default Tab Bar and Navigation Controller

Hi there,

I am currently working on an app that uses a tab bar and in at least one of the tabs I want to use a navigation controller. My application delegate takes a UITabBarController and there is a NavRootController class which is used to control the view of the first tab. This class is going to be my navigation controller class and thus has an ivar of type UINavigationController. Now I can instantiate another viewController (say, SecondViewController) and push it to the stack by calling the pushViewController:animated: method of self.navigationController, which perfectly works. But how can I go deeper in the hierarchy, so how can I push another view from a SecondViewController instance to the stack of my navigation controller now? Without a tab bar, my application delegate would take the navigation controller and I would send my push message to delegate.naigationController like this:
Code:
TestAppDelegate *delegate = [[UIApplication sharedApplication] delegate];
[delegate.navigationController pushViewController:viewInstance animated:YES];
But in my case I need to message the (navigation-)controller of the first view of the tab bar, right? But I have no clue how to do this.
In general: Is my approach correct at all or is the navigation controller in the wrong place?

Thanks in advance!
Muffi is offline   Reply With Quote
Reply

Bookmarks

Tags
hierarchy, navigation controller, tab bar controller

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 331
21 members and 310 guests
@sandris, ADY, BrianSlick, dacapo, Dani77, dre, HDshot, HemiMG, JasonR, MarkC, mer10, nibeck, prchn4christ, ryandb2, spiderguy84, themathminister, timle8n1, tomtom100, vogueestylee, vvenkatachallam
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,883
Threads: 89,229
Posts: 380,763
Top Poster: BrianSlick (7,129)
Welcome to our newest member, vvenkatachallam
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:09 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0