Why doesn't the SplitView iPhone template have a nib file for the RootView?

Posted by Dr Dork on Stack Overflow See other posts from Stack Overflow or by Dr Dork
Published on 2010-05-12T22:37:35Z Indexed on 2010/05/12 23:34 UTC
Read the original article Hit count: 234

I'm diving into iPad development and am learning a lot quickly, but everywhere I look, I have questions. After creating a new SplitView app in Xcode using the template, it generates the AppDelegate class, RootViewController class, and DetailViewController class. Along with that, it creates a .xib files for MainWinow.xib and DetailView.xib.

  1. How do these five files work together?
  2. Why is there a nib file for the DetailView, but not the RootView?
  3. When I double click on the MainWindow.xib file, Interface Builder launches without a "View" window, why?
  4. Below is the code for didFinishLaunchingWithOptions method inside the AppDelegate class. Why are we adding the splitViewController as a subview?

    (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    
    
    
    // Override point for customization after app launch    
    rootViewController.managedObjectContext = self.managedObjectContext;
    
    
    // Add the split view controller's view to the window and display.
    [window addSubview:splitViewController.view];
    [window makeKeyAndVisible];
    
    
    return YES;
    

    }

Thanks so much in advance for all your help! I still have a lot to learn, so I apologize if this question is absurd in any way. I'm going to continue researching these questions right now!

© Stack Overflow or respective owner

Related posts about iphone

Related posts about ipad