2
我试图在没有镜像模式的情况下在Apple TV上使用Airplay显示图片。但当镜像关闭时,[UIScreen screens]方法总是返回1屏幕(主屏幕)。 我希望我的照片显示与照片应用程序(无需镜像的Airplay)相同。UIScreen屏幕始终返回1屏幕
[[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)
此外,您不能启用的AirPlay从你的应用程序中的镜像。 http://stackoverflow.com/questions/8786080/how-can-i-turn-on-airplay-screen-mirroring-on-the-iphone-4s-programmatically – 2012-08-26 21:43:07