IPhone that converts iPad to iPad?

综合技术 2018-02-14

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.

Hello, buddy!

责编内容by:Hello, buddy! (源链)。感谢您的支持!

您可能感兴趣的

老生常谈category增加属性的几种操作 日常开发中,为一个已有的类(比如说不想影响其文件结构)、第三方库提供的类增加几个property,已经是十分常见且需要的操作了,有人会单独起草一份category.m文件,也有人直接继承,像我一般会用...
Swizzling in iOS 11 with UIDebuggingInformationOve... This is an abridged chapter from our book Advanced Apple Debugging & Reverse Eng...
UIGestureRecognizer subView Recognizer Problem The title is hard . The the main case is like this UIView *superView = initWithFrame:CGRectMake(0...
WCDB 源码解析 起因 最近开了个新项目,项目的主程童鞋引入了 WCDB 代替原先自制的 KeyValueStore 和 FMDB 。问为何,答曰:好用,线程安全又高效。又问具体实现细节,答曰:不懂,就是好用。所...
Sending an e-mail from the iPhone with a predefine... I'd like to make it so the user can send an email address which comes from a predefined email addres...