如何在ipad mini上检测到dpi? [英] How can I detect the dpi on an ipad mini?

查看:250
本文介绍了如何在ipad mini上检测到dpi?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个ipad应用程序,带有一些非常小的触摸点,在普通ipad的10英寸屏幕上几乎无法接受。我希望能够获得设备dpi,这样我就可以扩大mini的小元素的大小以及将来发布的任何mini。

I've got an ipad app with some pretty small touch points that are just barely acceptable on the 10 inch screen of a normal ipad. I'd like to be able to get the device dpi so I can scale up the size of the small elements for the mini and whatever future mini's that are released.

推荐答案

DPI是每英寸163像素(ppi):

The DPI is 163 pixels per inch (ppi):

http://www.apple.com/ipad-mini/specs/

http://www.apple.com/ipad-mini/specs/

您无法以编程方式获取此内容,因此您需要在代码中存储为常量。

You cannot get this programmatically, so you will need to store as a constant in your code.

这篇关于如何在ipad mini上检测到dpi?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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