IPad3 High Definition Mesh Network Issue
I am developing an iPad3 (Retina Display) app using Xcode 4.2 [iOS SDK 5.0]. I am using the following piece of code to detect retina display (high resolution).
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");
}
}
When I install the app on iPad3 it shows the output:
scale = 1.00000;
Non Retina Display iPad 1/2.
The above code does not detect Retina display.
I tried all 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.
Thanks in advance.
+3
source to share
3 answers