开发者

iPhone app converting to iPad? [closed]

开发者 https://www.devze.com 2023-02-12 04:46 出处:网络
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

We don’t allo开发者_如何学Pythonw questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

Closed 6 years ago.

Improve this question

I want to convert my app to a Universal app. Can anyone recommend some good tutorials for achieving this?

I need to have each View in Interface Builder as a separate, view for iPhone or iPad.

Thanks in advance!


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消