iPhone app converting to iPad? [closed]

纵然是瞬间 提交于 2019-12-02 18:39:29

I just did this mostly manually, using approximately the following steps:

Load the app's main window xib in Interface Builder, use the IB menu "Create iPad Version" to convert it to an iPad version, and save it under an appropriate name (a "-iPad.xib" suffix is common.)

In Xcode, add this new .xib file to your project and include it in the app's target.

Modify the app's Info.plist to name this new ipad xib under the "NSMainNibFile~ipad" key.

Change the Build target setting to say iPhone/iPad as the targeted device.

Add run-time code checks such as:

if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { ... }

to handle any programmatically created UI or drawing differences, select iPhone versus iPad xibs, etc.

Add appropriate icon sizes, default images, etc.

Redesign your views to optionally display more stuff, autoresize to support more rotations, use popovers, etc.

This is the tutorial I've used a few times. It's very easy to follow.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!