Converting Storyboard from iPhone to iPad
Solution 1:
I found out a kind of solution:
Duplicate your iPhone-Storyboard and rename it
MainStoryboard_iPad.storyboard
Close Xcode and then open this file any text editor.
Search for
targetRuntime="iOS.CocoaTouch"
and change it totargetRuntime="iOS.CocoaTouch.iPad"
-
Change the code in the MainStoryboard_iPad.storyboard from:
<simulatedScreenMetrics key="destination" type="retina4"/>
to<simulatedScreenMetrics key="destination"/>
Now save everything and reopen Xcode. The iPad-Storyboard has the same contents as the iPhone-file but everyting could be disarranged.
This saved me hours - hopefully this will help you
Solution 2:
If you had created a universal project, by default empty iPad storyboard would have been created, you just have to select iPhone storyboard select all (Command+A), copy (Command+C) and paste it on iPad storyboard. Make sure to move the entry point from the empty storyboard to newly copied storyboard before compiling.
Solution 3:
That didn't quite work for me. I did something a little bit different.
- Create a new story board file for the iPad version
- Open both the new file and the file i want to copy in textwrangler (text editor)
- Copied the xml text from old file to the new file between these xml tags
- First Tag
<scenes> <!--Contents View Controller-->
- Paste Here
- End Tags
</class> </classes>
That worked for me. I got a new layoutout with all my outlets connected, which alone saved me a few hours.