0
votes

I have an app whose iPhone storyboard is working fine. My iPad storyboard (which uses a split view controller) just comes up with a black screen.

  • Logging tells me that both the master and detail view controllers' -viewDidLoad: methods are being called
  • Logging also tells me that my detail's view's -drawRect: is being called

I didn't post code because I think the problem lies in my storyboard setup (iPhone storyboard works fine).

Update: -viewDidAppear: isn't being called in either of my view controllers, either.

1

1 Answers

1
votes

On an iPhone application, you can specify the root view of your application with the "Main nib file base name" key in the info.plist file. From the sound of it, the correct root view is not getting loaded for the iPad. Trying adding/or setting the correct view for "Main nib file base name (iPad)" in your info.plist file.

Also, make sure you are using the correct application lifecycle method to load your views.

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {


    if( UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad ) {

        [self.window addSubview:yourSplitViewController.view];

    } else {

        [self.window addSubview:yourNavigationController.view];

    }

    [self.window makeKeyAndVisible];

    return YES;
}