制作iPad应用程序通用? [英] Make an iPad app Universal?

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

问题描述

我已经看到很多问题,询问如何将iPhone应用程序转换为通用应用程序,答案通常是使用 iPad升级目标,有时更新的Info.plist 。我也见过这个问题和我一样,但我正在寻找一种不同的方法。

I've seen lot's of questions asking how to convert iPhone apps into Universal apps, and the answer has usually been to use the Upgrade Target For iPad and sometimes update the Info.plist. I've also seen this question, which asks the same thing as me, but I'm looking for a different approach.

在那里发布的答案说,为了将iPad应用程序转换为通用应用程序,必须更改目标设备系列然后为它编码。我认为答案是不正确的,因为你最终会得到一个不平衡的代码库。

The answer posted there says that in order to convert an iPad app to a universal app, one must just change the Target device family and then code for it. I think that answer is incorrect, because you end up with a lopsided codebase.

我如何将iPad应用程序转换为通用应用程序,以便目录结构看起来如此像一个升级的iPhone应用程序? (包括编辑plist和拆分委托等步骤。)

How would I convert an iPad app to a universal app, so that the directory structure would look like an iPhone app that was upgraded? (Including steps such as editing the plist and splitting the delegate.)

推荐答案

如果你想手动完成,首先要创建一个虚拟/模板通用应用程序,查看它与您的应用程序之间的差异,并更改您的应用程序以消除这些差异。其中包括以下步骤:

If you want to do it manually, first create a dummy/template Universal app, look at the differences between it and your app, and change your app to eliminate those differences. Among the steps:

创建iPad子目录。

在该子目录中为iPad创建合适的xib。

Create suitable xibs for the iPad in that subdirectory.

修改你的info.plist以将这些xib用于iPad(和图标等)

Modify your info.plist to use those xibs for iPads (and icons, etc.)

创建新的子类对于iPad,或使用修改现有的子类来检查UI范例并选择适当的UI子元素&代码中的大小。

Either create new subclasses for the iPad, or use modify your existing subclasses to check the UI paradigm and select the appropriate UI subelements & sizes in code.

如果您创建了新类,请根据需要将它们插入iPad xib。

If you created new classes, plug them into the iPad xibs as needed.

修改您的目标设置包括用于iPad的构建。

Modify your Target settings to include building for iPad.

如果需要,可以移动和/或重命名现有的iPhone文件/目录以使其对称。

Move around, and/or rename your existing iPhone files/directories to make them symmetric, if so desired.

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

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