将Storyboard从iPhone转换为iPad [英] Converting Storyboard from iPhone to iPad
问题描述
我有一个 iPhone
应用程序,它有一个故事板。现在我想提供一个 iPad
应用程序。所以我问我是否有一个功能可以帮助我将 iPhone
故事板转换为 iPad
故事板。
I have an iPhone
application which has a storyboard. Now I want to provide an iPad
application too. So I asked me whether there is a function which helps me convert my iPhone
storyboard to an iPad
storyboard.
具体来说:
是否有相似的功能或只有手动方式?
推荐答案
我发现了一种解决方案:
I found out a kind of solution:
-
复制你的iPhone-Storyboard并重命名
MainStoryboard_iPad.storyboard
关闭Xcode然后打开该文件任何文本编辑器。
Close Xcode and then open this file any text editor.
搜索 targetRuntime =iOS.CocoaTouch
并将其更改为 targetRuntime =iOS.CocoaTouch.iPad
更改代码MainStoryboard_iPad.storyboard来自:
Change the code in the MainStoryboard_iPad.storyboard from:
< simulatedScreenMetrics key =destinationtype =retina4/>
至
< simulatedScreenMetrics key =destination/>
现在保存所有内容并重新开始n Xcode。 iPad-Storyboard与iPhone文件具有相同的内容,但每一个都可能被排除在外。
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
这篇关于将Storyboard从iPhone转换为iPad的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!