Skip to content

Instantly share code, notes, and snippets.

@zapsleep
Created December 13, 2012 08:01
Show Gist options
  • Save zapsleep/4274892 to your computer and use it in GitHub Desktop.
Save zapsleep/4274892 to your computer and use it in GitHub Desktop.
Check multiple screens and mirroring
for (UIScreen *screen in [UIScreen screens])
{
if ([screen respondsToSelector:@selector(mirroredScreen)] &&
[screen 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.
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment