Xcode - 如何制作通用应用程序 [英] Xcode - How to make a universal app

查看:157
本文介绍了Xcode - 如何制作通用应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个iPhone应用程序,我想让它普及,但我不知道如何去做,至少是正确的。早些时候我试过升级当前目标到iPad,但它没有正常工作,但幸运的是我在尝试前保存了备份。

I have an iPhone app and I want to make it universal, but I don't know how to go about doing this, at least properly anyway. Earlier I tried the "upgrade current target to iPad" but it didn't work properly, but luckily I saved a backup from just before trying it.

无论如何,任何人都可以建议我如何做到这一点?

Anyway, can anyone advise me on how to do this?

推荐答案

创建一个针对iPad的新MainWindow_iPad.xib文件。打开应用程序的info.plist文件。添加一个新的键(类似于)主要笔尖名称(iPad)。 (别担心,Xcode会为您提供自动完成选项)将其设置为这个新的.xib文件。现在,当应用程序在iPad上启动时,它将加载新的.xib。您现在可以正常编写代码。

Create a new MainWindow_iPad.xib file targeted to iPad. Open the app's info.plist file. Add a new key for (something like) Main Nib Name(iPad). (Don't worry, Xcode will give you autocomplete options) Set it to this new .xib file. Now, when the app boots on an iPad, it'll load the new .xib. You can now write your code as normal.

这篇关于Xcode - 如何制作通用应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆