如何检测运行App Store应用程序的系统? [英] How can I detect which system my App Store application is running on?

查看:92
本文介绍了如何检测运行App Store应用程序的系统?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为Apple的App商店开发一个Cocoa Touch应用程序,我想根据它运行的设备在代码中进行一些调整。我怎么知道?

I am developing a Cocoa Touch application for Apple's App store and I want to do some tweaking in the code depending on what device it's running on. How can I tell?

推荐答案

我在Universal应用程序中使用它来确定代码是否在iPad上运行

I've used this in a Universal app to determine if the code is running on an iPad

if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) 
{
    // Do iPad only stuff here
}

这篇关于如何检测运行App Store应用程序的系统?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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