Different storyboards for different devices in Xcode 6
Solution 1
At Xcode 5 even using universal apps, i have two storyboards, one for iPad and another for iPhone. But now, in Xcode 6, theres just one storyboard for universal apps. I want to have two storyboards again, but I didn't find how to do this.
Do it the same way you were doing it in Xcode 5. No law says you have to have just one storyboard in a universal app in Xcode 6. The old way works just fine. I have apps that still do this (recompiled in Xcode 6 for iOS 8); it works.
However, something odd is undoubtedly going on. Look at this screen shot. It shows two projects open simultaneously in Xcode 6. One shows the iPhone / iPad buttons for switching between settings within the Universal setting; the other doesn't. I can't find a difference between the two projects that causes this differing interface.
Solution 2
- Open your Project setting >> select info
- In Custom iOS Target Properties add New row name Main storyboard file base name (iPad) and set value to "your new storyboard file name"
or You can find the way in my blog
Xcode 6 Separate storyboard for iPad and iPhone
Related videos on Youtube
Alexandre Nunes Costa
Updated on June 22, 2022Comments
-
Alexandre Nunes Costa almost 2 years
In the new Xcode 6, we have just one storyboard for universal apps. But the differences in my app are beyond the different sizes of the screen between iPhone and iPad. My App iPhone screen does not rotate, it's just portrait, and my iPad screen rotate all. My iPhone first screen is a table view, and my iPad first screen is a collection view, and other differences. How can I make it happen in Xcode 6?
In other words. At Xcode 5 even using universal apps, i have two storyboards, one for iPad and another for iPhone. But now, in Xcode 6, theres just one storyboard for universal apps. I want to have two storyboards again, but I didn't find how to do this.
-
Alexandre Nunes Costa over 9 yearsI don't have level to put images at my question, but in Xcode 6 theres no fields to configure two storyborads like in Xcode 5. I've uploaded the prints in my Google Drive. drive.google.com/…
-
matt over 9 yearsI didn't say anything about fields. Those fields are just front ends for editing the Info.plist. Learn to edit the Info.plist directly.
-
matt over 9 yearsBesides you can do it. Switch to iPhone and set the name of the storyboard for iPhone. Switch to iPad and set the name of the storyboard for iPad. Now switch to Universal. Do nothing. Done. Basically they've made the interface easier.
-
matt over 9 yearsOr, make it totally automatic by using automatic names, e.g.
Main.storyboard
andMain~ipad.storyboard
. -
matt over 9 yearsOkay so now I've given you three different ways to set it up.
-
Alexandre Nunes Costa over 9 yearsIt's bizarre, but worked. I created a github project with step by step commits. thanks matt. github.com/alexandrenc/TwoStoryboards
-
matt over 9 yearsNevertheless I do see why you're confused. I'm confused too. See my addition to my answer.
-
matt over 9 yearsI've filed a bug report on this. I can understand if they have abolished the iPhone / iPad buttons, but I do not see why those buttons sometimes appear and sometimes don't.
-
Thomás Pereira over 9 yearsTOP solution! Thanks.
-
Natasha about 9 yearsThanks, very helpful.