如何检测MonoTouch中的Retina显示屏 [英] How to detect the Retina Display in MonoTouch

查看:111
本文介绍了如何检测MonoTouch中的Retina显示屏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个问题我想在我的MonoTouch应用程序中检测视网膜显示。谢谢。

Just that question I want to detect the retina display in my MonoTouch app. Thanks.

推荐答案

已经答案,但这里是C#版本:

There are already answers for ObjectiveC but here's a C# version:

 bool retina = (UIScreen.MainScreen.Scale > 1.0);

这将适用于较新的iPhone和iPod Touch,我怀疑(将在不到两周的时间内知道)对于 iPad。

That will work for the newer iPhone and iPod Touch and I suspect (will know in less than two weeks) for the new iPad.

Jason的方法也会起作用,如果您需要了解几个与硬件相关的功能(例如视网膜+相机)。

Jason's approach will work too and can be attractive if you need to know several hardware related features (e.g. retina + camera).

这篇关于如何检测MonoTouch中的Retina显示屏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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