How put together Tab bar + Navigation based in the same app.

Discussion in 'iOS Programming' started by mamcx, Jan 25, 2009.

  1. mamcx macrumors regular

    Joined:
    Mar 13, 2008
    #1
    I know this question exist elsewhere but frankly I can't get it to work.

    I read the docs but can't figure how do this.

    From the info I found, look like the navigation controller must be on the AppDelegate, in a share var, and from the main window. I don't found that intuitive. This Is what I want (or expect):

    - I have a main window with 5 tab bars. 4 load other nibs that are table based and need drill-down to details pages.
    - I imagine that the navigation controller is on EACH listing window, and push from there

    So, I have:

    - Main Window: Customers, Products,...
    - Customer: List of customer.
    - CustomerEdit: Edit the customer

    What I need to do to this scenario to work?
     
  2. eddietr macrumors 6502a

    Joined:
    Oct 29, 2006
    Location:
    Virginia
    #2
    So you want a UITabBarController. That TabBarController maintains a list of view controllers. Those view controllers in your case should be NavigationControllers.

    Each NavigationController then manages a stack of view controllers (list customers, show details of a single customer, etc.)
     
  3. mamcx thread starter macrumors regular

    Joined:
    Mar 13, 2008
    #3
    Ok, I was able to put that to work.

    Now the problem is that the navigation bar is on the main window and can't be on the loaded nib, that mean that I must control the navigation from the tabbar...
     
  4. eddietr macrumors 6502a

    Joined:
    Oct 29, 2006
    Location:
    Virginia
    #4
    No, the navigationcontroller can own it's own NIB.

    I'm not sure what you mean by "I must control the navigation from the toolbar". That's not the case. As the user selects each tab item, you will be loaded an separate nav controller with its own navigation stack.
     

Share This Page