如何在 iOS 4.3 上进行屏幕镜像?
苹果的开发者文档称,屏幕镜像在 iOS 4.3 上可用,没有任何魔法。人们应该只使用 mirroredScreen
属性,但它是只读的。
来自 Apple 的 developers.apple.com:
镜像屏幕
外部显示器镜像屏幕。
...如果支持镜像且当前处于活动状态,则此属性包含与设备主屏幕关联的屏幕对象。这表示所连接的显示器正在镜像屏幕。当禁用、不支持镜像或没有屏幕连接到设备时,此属性的值为 nil。
要禁用镜像并使用外部显示器呈现独特的内容,请创建一个窗口并将其与相应的屏幕对象关联。
它只说了如何禁用镜像模式,但没有说如何启用镜像模式。我该怎么做?
我想在投影仪上镜像我的应用程序,而不创建我的视图副本并在需要时更新它们 - 它看起来很糟糕。
此外,模拟器在使用外部屏幕模拟时经常崩溃 - 这可以吗?
Apple's Developer documentation said that screen mirroring is available on iOS 4.3 without any magic. One should just use the mirroredScreen
property, but it's readonly.
From Apple's developers.apple.com:
mirroredScreen
The screen being mirrored by an external display.
...If mirroring is supported and currently active, this property contains the screen object associated with the device’s main screen. This represents the screen being mirrored by the attached display. The value of this property is nil when mirroring is disabled, not supported, or no screen is connected to the device.
To disable mirroring and use the external display for presenting unique content, create a window and associate it with the corresponding screen object.
It said how to disable but not how to enable mirroring mode. How do I do it?
I want to mirror my app on the projector without creating copies of my views and update them when needed - it looks bad.
Also the simulator crashes often on using external screen emulation - is it okay?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为目前只有 iPad 2 支持镜像。连接外部显示器时,您可以收听通知。
http://imthi.com/blog /programming/uiscreen-notifications-for-connecting-external-display-in-ios.php
I think currently only iPad 2 support mirroring. You can listen to notification when a external display is connected.
http://imthi.com/blog/programming/uiscreen-notifications-for-connecting-external-display-in-ios.php