Is it possible to make only one application and inside of it make two storyboards, one for iPhone and one for iPad? I don't like the idea of running the app on iPad and clicking the 2x button.
My idea was to create two storyboards and have a beginning class that would check if the device you are using is an iPhone or an iPad and then redirect to the according storyboard after. I think it is a good idea cause the code is the same.
1) You can use Autolayout constraints and size classes to make the view compatible to both iPhone and iPad screen sizes. 2) You can create and use separate Storyboards or . Xibs each for iPhone and iPad and use accordingly.
Create storyboards by File -> New -> File -> Select Storyboard -> Next -> Give it a name -> Create.
A storyboard is a visual representation of the user interface of an iOS application, showing screens of content and the connections between those screens.
In Xcode 9.2, simply go to your Storyboard and go to the bottom, Click View As and choose a device you like.
create two different storyboards and name them so they are easily specified which is which. Then click on the file that allows you to change settings for your actual app. and change the build to universal
, then specify which storyboard you want to use!
there is a storyboard setting for iphone and ipad
iPhone
iPad
Make sure the names of the storyboards are correctly set though
Even if you already made an app non universal, just change it to universal (target-->summary), then create a new ipad story board and make sure under target-->summary that the main iphone storyboard and main ipad storyboard are set to the right storyboards.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With