iPad3高分辨率视网膜显示问题 [英] iPad3 high resolution retina display issue

查看:145
本文介绍了iPad3高分辨率视网膜显示问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Xcode 4.2 [iOS SDK 5.0]为iPad3(Retina Display)开发应用程序。我正在使用以下代码片段来检测视网膜(高分辨率)显示。

I am developing an app for iPad3(Retina Display) using Xcode 4.2 [iOS SDK 5.0]. I am using following code snippet for detecting retina (high-resolution) display.

 if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)]) 
{
NSLog(@"scale = %f",[[UIScreen mainScreen] scale]);
if ([[UIScreen mainScreen] scale] > 1.0) {
    NSLog(@"Retina Display iPad3");
} 
else    
{
    NSLog(@"Non Retina Display iPad 1/2");
}
}

当我在iPad3设备上安装应用程序时,它显示输出:

When I install app on iPad3 device it is showing output:

scale = 1.00000;

非Retina Display iPad 1 / 2。

以上代码未检测到Retina显示。

Above code is not detecting Retina display.

我已经尝试了所有与谷歌视网膜显示器检测相关的代码,但所有代码都未能检测到视网膜显示。
有没有办法检测iPad 3视网膜显示屏。

I've tried all the codes related to retina display detection from google but all codes failed to detect retina display. Is there any method to detect iPad 3 retina display.

提前谢谢。

推荐答案

为了让您的应用程序支持新的iPad视网膜显示器,您需要开发和构建5.1 SDK(我认为您需要使用XCode 4.3)。

For your app to support the new iPad retina display, you need to develop and build against the 5.1 SDK (which I think means you need to use XCode 4.3).

这篇关于iPad3高分辨率视网膜显示问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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