0

I have two storyboards named HomeView~iphone.storyboard and HomeView~ipad.storyboard. Both storyboards have an initialViewController in the storyboard file.

UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"HomeView"
                                                     bundle:nil];
UIViewController *controller = [storyboard instantiateInitialViewController];

I get the following error when I try to access the instantiateInitialViewController.

Could not find a storyboard named HomeView in bundle NSBundle - NSInvalidArgumentException

Do you have any Idea? The apple documentation says ~iphone and ~ipad is supported for any file in the bundle.

4

1 回答 1

2

您是否尝试过HomeView.storyboard用于 iPhone 和HomeView~ipad.storyboardiPad?

于 2013-02-12T14:49:51.337 回答