Reputation: 37
Im developing an app and I want to use one storyboard for iPhone things and another for iPad thing, is it possible? where I have to define it?
Upvotes: 2
Views: 390
Reputation: 74174
In the Info.plist
, there is a key called UIMainStoryboardFile
.
By default, that is assigned to Main
, your Universal storyboard.
There are two more string
-based keys available that can be added and assigned to different storyboards:
UIMainStoryboardFile~ipad
UIMainStoryboardFile~iphone
Info.plist example:
~~~
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIMainStoryboardFile~ipad</key>
<string>iPadStoryboard</string>
<key>UIMainStoryboardFile~iphone</key>
<string>iPhoneStoryboard</string>
~~~
Note: Make sure that the UIViewController
in each of the Storyboards is set as Is Initial View Controller
otherwise they will not show up by default when the app runs.
Upvotes: 1
Reputation: 38
Open the properties of your iOS project. Select under devices: Universal. And you can select 2 storyboards, one for iPhone/iPod and one for iPad.
Upvotes: 1