iphone - 在 iOS 5 上阻止 AirPlay 镜像

标签 iphone ios ipad airplay apple-tv

在装有 iPad 2 或 iPhone 4S 的 iOS 5 上,用户可以使用他们的 Apple TV 和 AirPlay 启用屏幕镜像。如何防止我的应用程序以这种方式被镜像?有什么方法可以检测到这种镜像正在发生,以便我可以防止我的内容被镜像吗?

这样做的原因是因为我有一些内容在法律上不允许在电视屏幕上显示。

最佳答案

这是一个非常非常糟糕的主意,我讨厌它,因为你在抑制你的用户。话虽如此,AirPlay 镜像的工作方式与连接 VGA/HDMI 适配器的方式相同,当您连接适配器时,您可以在“第二台显示器”上显示任何您想要的内容。如果您想“阻止”镜像,您可以将外部显示器的窗口设置为空白/纯黑色 View 。

Most iOS applications create and use only one window during their lifetime. This window spans the entire main screen of the device and is loaded from the application’s main nib file (or created programmatically) early in the life of the application. However, if an application supports the use of an external display for video out, it can create an additional window to display content on that external display. All other windows are typically created by the system, and are usually created in response to specific events, such as an incoming phone call.

查看 View Programming Guide for iOS ,特别是 Windows 部分和 Displaying Content on an External Display

关于iphone - 在 iOS 5 上阻止 AirPlay 镜像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8423476/

相关文章:

iphone - 如何在 objective-c 中调用此方法

iphone - 使用 mfmailcomposeviewcontroller 时翻译按钮上的文本

iphone - 我如何向分组的 UITableView 添加阴影(如官方 Twitter 应用程序所示)?

ios - 403 错误 - 这是一个错误。错误 : disallowed_useragent

iPhone didSelectRowAtIndexPath 没有触发

ipad - HTML5声音文件播放器

iphone - 为 iOS 3 编译的应用程序可以在 iOS 4 上运行吗?

ios - 在 iTunesConnect 中设置 "Tax Info"的问题

ios - Apple Push Notifications - 将数据放入应用程序

iphone - 如何在 iOS 上获取模板选择器/文档浏览器 View ?