小编Mr *_* 87的帖子

UIScreen屏幕始终返回1个屏幕

我正试图在没有镜像模式的情况下使用Airplay在Apple TV上显示图片.但是,当镜像关闭时,[UIScreen screen]方法总是返回1个屏幕(主屏幕).我希望我的图片显示与Photo应用程序相同(没有镜像的Airplay).

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(screenDidConnect:) name:UIScreenDidConnectNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(screenDidDisconnect:) name:UIScreenDidDisconnectNotification object:nil];
Run Code Online (Sandbox Code Playgroud)

我使用过它们,但只有在镜像开启时才能使用它们.

请帮我.非常感谢!我正在使用Apple TV1和iPad 2(iOS 5.0.1)

xcode mirroring airplay ipad-2

2
推荐指数
1
解决办法
1716
查看次数

标签 统计

airplay ×1

ipad-2 ×1

mirroring ×1

xcode ×1