Just that question I want to detect the retina display in my MonoTouch app. Thanks.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
There are already answers for ObjectiveC but here's a C# version:
bool retina = (UIScreen.MainScreen.Scale > 1.0);
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's approach will work too and can be attractive if you need to know several hardware related features (e.g. retina + camera).