Stanford iPhone dev Paparazzi 1 setup help

Posted by cksubs on Stack Overflow See other posts from Stack Overflow or by cksubs
Published on 2010-05-06T23:47:05Z Indexed on 2010/05/07 0:38 UTC
Read the original article Hit count: 649

Hi, I'm having trouble using a tab bar control. Basically, when I build and run I'm just getting the blank white default "Window" screen.

I was following this guide:

http://www.iphoneosdevcafe.com/2010/03/assignment-4-part-1/#comment-36

  1. Drag a Tab Bar Controller from the Library to MainWindow.xib.
  2. Control drag from the App Delegate to the Tab Bar Controller.
  3. Drag a Navigation Controller from the Library to MainWindow.xib.
  4. Control drag from the App Delegate to the Navigation Controller.
  5. Drag a second Navigation Controller from the Library to MainWindow.xib.
  6. Control drag from the App Delegate to the Navigation Controller.

This completes all the connections between the App Delegate and the tab bar and two navigation controllers. By using IB to set up the tab bar and navigation controllers in this way, you need not allocate and init the controllers in AppDelegate.m. When you build and run this, you will see the tab bar controller and two navigation controllers.

Is there a step there that he missed? How do I hook the Tab Bar Controller up to the Window?

EDIT:

Do I need to do something like this?

mainTabBar = [[UITabBarController alloc] init];
[window addSubview:mainTabBar.view];

That's still not working, but I feel like I'm on the right track? Why can't this all be done from Interface Builder?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about objective-c