iPad3 high resolution retina display issue

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");
}
}

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

  • Cannot scroll in UIWebView in iOS
  • “The archive is invalid” during archive validation in xcode
  • Batch Build and Archive of iOS apps via Terminal
  • Using ARC and UITableViewController is throwing Observation info was leaked, and may even become mistakenly attached to some other object
  • ARC and ASIHTTPRequest
  • Static cells: Content does not appear
  • scale = 1.00000;

    Non Retina Display iPad 1/2.

    Above code is not detecting Retina display.

    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.

    Thank you in advance.

    3 Solutions Collect From Internet About “iPad3 high resolution retina display issue”

    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).

    + (BOOL)isRetina
    {
        if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)] && [[UIScreen mainScreen] scale] == 2.0) {
            return YES;
        }
        return NO;
    }
    

    I have tested in the iPad3, this method return YES.

    Try replacing:

    if ([[UIScreen mainScreen] scale] > 1.0) {
    

    by

    if ([[UIScreen mainScreen] scale] >= 1.0) {
    

    (I might be missing the point here, but if iPad3 has scale of 1.0, then ‘> 1.0’ is incorrect)