普遍适用 [英] Universal application

查看:95
本文介绍了普遍适用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何为iphone和ipad制作通用应用程序。我们如何检测设备是用于iPhone还是iPad?

How to make universal app for iphone and ipad. How we detect the device whether it is for iPhone or iPad?

推荐答案

在Xcode 3中

在Xcode中选择您的目标,右键单击并使用升级当前目标为iPad ...命令。

select your target in Xcode, right-click and use the "Upgrade Current Target for iPad…" command.

在Xcode 4中

点击项目并转到目标。在摘要标签中,将设备更改为通用。

click on the project and go to the target. In Summary tab, change Device to Universal.

我使用

UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad

用于检测iPad。

这篇关于普遍适用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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