Вопрос

I know many questions related to this topic has already been asked and answered but none of them completely resolved the issue I'm facing. And there there are too many suggestions so I'm pretty confused what to use and what not to.

Anyway here's my scenario. I'm trying to create an iOS app using the Empty Application template in Xcode 4.6.2. Its a universal app so I added two storyboards, one for iPhone and one for iPad.

The problem is when I run it, it only displays a black white background with the warning message, application windows are expected to have a root view controller at the end of application launch.

I did add the Main storyboard from the Build Settings. It works fine say, if I set the iPhone storyboard there and run the iPhone simulator. But since I have two storyboards, I don't know what to do.

Please give me the right, clear instructions to sort this out.

Also which one of the following is the recommended way?

  1. Share a single ViewController for both iPhone and iPad storybaords.
  2. Create separate ViewControllers for each device?

Thanks a lot in advance.

Это было полезно?

Решение

For an universal app you can set different storyboards for iphone and ipad in the build settings under summary section. It will automatically take the corresponding storyboard according to the device.

iPhone/ iPod Deployment Info - Settings for iphone
iPad Deployment Info - Settings for iPad

enter image description here

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top