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?
As I understand the documentation,
mirroredScreenwill reference the main screen if you access the property on a secondary screen that actually is the mirrored screen. As in:[[UIScreen mainScreen] mirroredScreen]would then always returnnilbecause the mainScreen does not mirror itself.