处理iPad Mini屏幕尺寸 [英] Dealing with iPad Mini screen size

查看:126
本文介绍了处理iPad Mini屏幕尺寸的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

全新iPad Mini的屏幕尺寸为7.9英寸。它有视网膜显示器吗?它会自动扩展现有的xib和故事板吗?还是我们必须创建两个版本?

The new iPad Mini has a 7.9 inch screen size. Does it have a retina display? Will it automatically scale existing xibs and storyboards or do we have to create two versions of each?

我们是否处理它与我们处理iPhone 5的方式类似?

Do we deal with it similar to the way we deal with the iPhone 5?

如何创建定义或条件以查看设备是否正在运行iPad Mini?

How would I create a definition or a condition to see if the device is running iPad Mini?

推荐答案

如果您的应用程序在iPad 1或iPad 2上运行,它将在新iPad mini上正常工作。迷你上没有视网膜显示屏。从应用程序的角度来看,它与iPad 2相同。

If your app works on an iPad 1 or an iPad 2 it will work as-is on the new iPad mini. There is no retina display on the mini. From an app's perspective it's identical to the iPad 2.

编辑:有人询问如何确定应用程序何时在iPad mini上运行。没有API检查。屏幕尺寸没有帮助。 UI_USER_INTERFACE_IDIOM()没有帮助。直到有人真的有一个,没有办法知道 UIScreenMode pixelAspectRatio 是否有任何不同(可能与iPad 2相同)。

It was asked how to determine when an app is running on an iPad mini. There is no API check for this. The screen size doesn't help. UI_USER_INTERFACE_IDIOM() doesn't help. Until someone actually has one, there is no way to know if the UIScreenMode pixelAspectRatio is any different (probably it's the same as the iPad 2).

这只留下一种可能性 - 从 uname()获取机器和硬编码检查此值。这绝不是一种理想的方法。在撰写本文时,我们不知道它的价值。也许 iPad5,x 假设第四代iPad是 iPad4,x

This leaves only one possibility - to get the machine from uname() and hardcode a check against this value. This is never a desired approach. And as of this writing, we don't know what the value will be. Perhaps iPad5,x assuming the 4th gen iPad is iPad4,x.

编辑:到目前为止我已经看到有关iPad mini返回iPad2,5的报告(是的,这是两个逗号五)以及机器名称的iPad2,6和iPad2,7。

So far I've seen a report that the iPad mini returns iPad2,5 (yes, that's a two comma five) as well as iPad2,6 and iPad2,7 for the machine name.

这篇关于处理iPad Mini屏幕尺寸的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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