A tutorial illustrating using Interface builder to build an iPhone application using a UINavigationController. This application starts from scratch and follows Apple's quidelines of each view being a separate xib.

The approach in this tutorial is Interface Builder centric, rather than starting with code.

Part Two will share data between xibs.

OUTDATED **** OUTDATED *******

22 Likes

  • Phil Lam 1 year ago
    Hi , i have tried this tutorial 3 time and still the same thing it stay on a blank page, it doesn't work, it must miss something somewhere ... The TabBar work very good but not this one. Thx for helping to figure it out.
  • Richipal Singh 1 year ago
    did it ever work for you, I am trying it and same blank page for me.
  •  
  • Richipal Singh 1 year ago
    Is there a way to download code, I tried the example it still shows me the window instead of RootViewController.xib
  •  
  • Fernando Barajas 11 months ago
    One thing he totally missed was connecting
    the IBOutlet navigationController from the NavigationControllerAppDelegate to the navigationController in the MainWindow.xib which will be used for the Navigation after those are connected. It will no longer show a blank screen!
  •  
  • James A. Brannan 11 months ago
    Wow, didnt catch that one. Of course I had to have made the connection, otherwise I would have had a blank screen. Sorry if it caused anybody heartache.
  •  
  • J W 11 months ago
    Doing this stuff in IB is tricky so thanks for the tutorial!

    I'd like to do something just slightly different: I'd like to have the first screen be just a plain screen with a button (no NavigationController) so that when you click the button, it goes to a second screen which is a NavigationController screen.

    I created a ViewController XIB for the second screen but it doesn't come with a delegate, which seems to be only at the top, application, level.

    Is there a way I can connect the NavigationController to a plain ViewController without a delegate or, alternatively, is there a way to create a delegate within a ViewController XIB?

    Thanks!
  •  
  • Nishant Pant 11 months ago
    I am a newbie and was following James tutorial but I always get the same white screen as Phil. I did read Frenando's comment on the missing link. But can you please give us the line of code that needs to be put in to create the missing link ?
  • Nishant Pant 11 months ago
    Ok I found it.
    1. Open Mainwindow.xib.
    2. Cick on the app delegate icon
    3. Go to tools-->Connection Inspector
    4. Find the variable that you just declared. (i.e the IBOutlet UINavigationController *navController) in this window in the Outlets section
    5. Drag the connection to the NavigationController icon in the small window which says "MainWindow.xib"

    That did it for me. And James thank you so much for this nice tutorial.
  •  
  • first & last name 10 months ago
    which is the code pasted in RootViewController at 19:47?? i am getting 4 error messages. Ty!
  •  
  • Alexandru Poke 10 months ago
    @JW did u manage to solve the problem?

    i want to do a similar thing..have the nav controller the second controller... the idea is how do i push the nav controller?
  •  
  • VMan 10 months ago
    Thank you so much for this video!
  •  
  • Patrick Santana 8 months ago
    after trigger the action, you should release it:

    SecondViewController *varSecondViewController = [[SecondViewController alloc] initWithNibName:@"SecondViewController" bundle:nil];

    [[self navigationController] pushViewController:varSecondViewController animated:YES];

    [varSecondViewController release];


    Great tutorial...
  •  
  • dianna m 7 months ago
    in case anyone else has trouble with the screen being blank, i created a short video on making the connection

    screencast.com/t/VEsS9pFN
  •  
  • pucca 6 months ago
    I think your tutorial is good and follow the best practice. I just download the xcode 3.2 and IB 3.2 with iphone SDK 3.0, i found the IB inspector in the outlet part is different and I tried to connect view, it does not work. Do have have the same issue?
  •  
  • Rich Boy 5 months ago
    GREAT VIDEO! keep up the good Work!
  •  
  • medopal 3 months ago
    thanks James, great one

    Just one question, i have XCode + IB 3.1, how is this practice outdated, can u plz explain
  •  
This conversation is missing your voice. Take five seconds to join Vimeo or log in.

Advertisement

Statistics

  •  
    plays
    likes
    comments
  • Total
    plays 9,302
    likes 23
    comments 16
  • Dec 30th
    plays 13
    likes 0
    comments 0
  • Dec 29th
    plays 17
    likes 0
    comments 0
  • Dec 28th
    plays 13
    likes 0
    comments 0
  • Dec 27th
    plays 7
    likes 0
    comments 0
  • Dec 26th
    plays 7
    likes 0
    comments 0
  • Dec 25th
    plays 9
    likes 0
    comments 0
  • Dec 24th
    plays 12
    likes 0
    comments 0
  • Dec 23rd
    plays 15
    likes 0
    comments 0
Previous Week

Downloads

Please join Vimeo or log in to download the original file. It only takes a few seconds.