Q:

UIScreen mirroredScreen property always returns nil

I want to present unique content on the external connected display if mirroring is not supported by the device (original iPad) but want to use screen mirroring if it's iPad 2.  Now when I try to code this as follows:
if ([UIScreen instancesRespondToSelector:@selector(mirroredScreen)] && [[UIScreen mainScreen] mirroredScreen] == nil) {
    // Mirroring not supported.  Present unique content on external display
}

[[UIScreen mainScreen] mirroredScreen] always returns nil. 
Am I doing something wrong? 

A:

As I understand the documentation, mirroredScreen will reference the main screen if you access the property on a secondary screen that actually is the mirrored screen.  As in:
if ([[UIScreen screens] count] > 1) {
    UIScreen *secondaryScreen = [[UIScreen screens] objectAtIndex:1];
    NSLog(@"%@", secondaryScreen.mirroredScreen); // will reference the mainScreen
}

[[UIScreen mainScreen] mirroredScreen] would then always return nil because the mainScreen does not mirror itself. 

A:

Apple have a recommendation about the way to detect if the screen is mirrored or not here : http://developer.apple.com/library/ios/#qa/qa1738/_index.html 
UIScreen *aScreen;

NSArray *screens = [UIScreen screens];
for (aScreen in screens) 
{
    if ([aScreen respondsToSelector:@selector(mirroredScreen)] 
              && [aScreen mirroredScreen] == [UIScreen mainScreen]) 
    {
        // The main screen is being mirrored. 
    }
    else 
    {
        // The main screen is not being mirrored, or
        // you are not running on a compatible device. 
    }
}

