views:

30

answers:

0

I have this code in my TNApplicationDelegatePad class:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];

    splitViewController = [[UISplitViewController alloc] init];

    TNFeedListViewController *feedListViewController = [[[TNFeedListViewController alloc] init] autorelease];
    articleViewController = [[TNArticleViewController alloc] init];

    splitViewController.viewControllers = [NSArray arrayWithObjects:feedListViewController, articleViewController, nil];

    [window addSubview:splitViewController.view];
    [window makeKeyAndVisible];

    return YES;
}

However, nothing shows up. I just get a black screen with a status bar. When I do a NSLog(@"Foo"); I can see Foo in the debugger, though.

Can anyone help me? Thanks.


P.S. This is a universal app, main function:

int main(int argc, char *argv[]) {
    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];

    int returnValue = 1;

    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
        returnValue = UIApplicationMain(argc, argv, @"UIApplication", @"TNApplicationDelegatePhone");
    } else {
        returnValue = UIApplicationMain(argc, argv, @"UIApplication", @"TNApplicationDelegatePad");
    }
    [pool release];
    return returnValue;
}