dev_help
dev_help

Reputation: 119

Using iPad and iPhone storyboards in Xcode

I have created an app with a storyboard in Xcode and I now want to create an iPad version. I successfully created an iPad storyboard, but it currently runs with the code from the iPhone version.

The issue I am having is that the code for the iPhone is still running with the iPad storyboard. I would like to duplicate the iPhone code and adjust it for the iPad.storyboard, but I am not sure how to do that. Thanks.

Upvotes: 1

Views: 240

Answers (2)

cdf1982
cdf1982

Reputation: 813

If I understand your problem, you now have two storyboards, one for iPhone and one for iPad, which are both working properly, but you want to modify part of the code just for the iPad version.

You should duplicate the classes you want to edit for the iPad version of your app and assign those new classes to the corresponding ViewControllers of the iPad storyboard.

Of course, you are still making a single, universal app.

Upvotes: 1

meda
meda

Reputation: 45490

I took a screenshot for you:

enter image description here

So switch the tabs and assign the appropriate storyboard. and make sure it is set to universal.

Upvotes: 1

Related Questions