27

I have Xcode 6 beta installed and I'm trying to develop an universal app. Before Xcode 6, you had to create 2 separate Storyboards for iPad and iPhone and you could set it in the Deployment Info.

enter image description here

In Xcode 6, it seems that separation is gone. There aren't 2 tabs to set the storyboards individually.

enter image description here

But when you go to create a Storyboard, you are asked to choose a device family.

enter image description here

Can someone explain what's going on in Xcode 6 please?

Thank you.

Isuru
  • 30,617
  • 60
  • 187
  • 303
  • 3
    someone asked the same question before, and it was answered on WWDC as not a bug, but as structural changes in Xcode. you can find more information under the _Unified Storyboard for Universal Apps_ section: https://developer.apple.com/library/prerelease/ios/releasenotes/General/WhatsNewIniOS/Articles/iOS8.html – holex Jun 11 '14 at 11:11

3 Answers3

22

To support the new Size Classes, you'll need to enable "Use Size Classes" in the File Inspector of your storyboard. This will allow you to configure your storyboard for multiple device sizes.

Note that this will make your storyboard incompatible with Xcode 5.

Use Size Classes Xcode

When you've enabled this, you'll see the size selector appear at the bottom of the screen. Use this to select your device size:

Size Selector

In your project preferences, you can still select a different storyboard for iPhone or iPad using the dropbown box. Notice that the storyboard name will persist if you select a different one for each device.

Device Selection

Even though this is still an option, Apple is moving developers towards a single, unified storyboard.

Mike Buss
  • 980
  • 9
  • 25
  • Hey Mike, thanks. Perfect timing because I was laying off of this issue for a while due to the lack of information regarding this and I just started to see if I can get my head around this new size classes thing. – Isuru Jun 22 '14 at 19:01
  • Hey Mike, i have a issue when using the universal storyboards for iPhone and iPad both. i have designed the application for iPad and iPhone using the different size classes as available in Xcode6. but now when i connect the outlet of a label to iPhone design and then to iPad design the outlet got disconnected from previous one. can you tell me whats the issue. – Rohit Jul 31 '14 at 05:08
0

It seems Auto layout is used to support all devices now, yet you can create separate storyboards? Have you tried calling the separate storyboards in code in the app delegate

    if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
       //Use iPhone Storyboard

     } else {

       //Use iPad Storyboard
     }
JSA986
  • 5,870
  • 9
  • 45
  • 91
0

After Xcode 6 > version for using different storyboard for iPhone and iPad need to follow xcode-6-separate-storyboard-for-ipad-and-iphone

Note : For Application which does not use Auto Layout, so while adding new storyboard for iPad and disabling auto layout, a pop will appear that's where you need keep size class data to iPad as shown in below screen.

enter image description here

Paresh Navadiya
  • 38,095
  • 11
  • 81
  • 132