iOS以编程方式获取物理屏幕大小? [英] iOS get physical screen size programmatically?

查看:114
本文介绍了iOS以编程方式获取物理屏幕大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这可能吗?我想要的是英寸数,而不是像素数。我知道它大概是160 ppi。但不完全是。

Is this possible? I want the number of inches, not the number of pixels. I know it is approximately 160 ppi. But not exactly.

推荐答案

如果它可用,它将在 UIScreen UIDevice 但它不存在。

If it were available it would be in UIScreen or UIDevice but it is not there.

您可以在 Erica的UIDevice-中从信息中推断出来 - 扩展名维基百科上列出的每个设备的规格。

You can infer it from info in Erica's UIDevice-extension and the specs for each device listed here on Wikipedia.

这篇关于iOS以编程方式获取物理屏幕大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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