In the iPad SplitView template, where's the code that specifies which views are to be used in the Sp
- by Dr Dork
In the iPad Programming Guide, it gives the following code example for specifying the two views (firstVC and secondVC) that will be used in the SplitView...
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
MyFirstViewController* firstVC = [[[MyFirstViewController alloc]
initWithNibName:@"FirstNib" bundle:nil] autorelease];
MySecondViewController* secondVC = [[[MySecondViewController alloc]
initWithNibName:@"SecondNib" bundle:nil] autorelease];
UISplitViewController* splitVC = [[UISplitViewController alloc] init];
splitVC.viewControllers = [NSArray arrayWithObjects:firstVC, secondVC, nil];
[window addSubview:splitVC.view];
[window makeKeyAndVisible];
return YES;
}
but when I actually create a new SplitView project in Xcode, I don't see any code that specifies which views should be added to the SplitView. Here's the code from the SplitView template...
- (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 in advance for all your help! I'm going to continue researching this question right now.