我正在尝试在没有镜像模式的情况下使用 Airplay 在 Apple TV 上显示图片。但是当镜像关闭时,[UIScreen 屏幕] 方法总是返回 1 个屏幕(主屏幕)。我希望我的图片显示与照片应用程序相同(不带镜像的 Airplay)。
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(screenDidConnect:) name:UIScreenDidConnectNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(screenDidDisconnect:) name:UIScreenDidDisconnectNotification object:nil];
我使用了它们,但它们仅在镜像打开时才起作用。
请帮我。非常感谢!我正在使用 Apple TV1 和 iPad 2 (iOS 5.0.1)