将iPad内容输出到外部显示器 [英] Output iPad content to external display

查看:493
本文介绍了将iPad内容输出到外部显示器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我听说可以将iPad应用程序中的内容输出到外部显示器,但应用程序必须为此做好准备,并且存在严重的局限性。任何指针?

I've heard it's possible to output content from an iPad app to an external display, but the app has to be prepared for this and there are serious limitations. Any pointers?

而且,这可以在iPhone上完成吗?它是一样的吗?

And also, can this be done for iPhone? Is it the same?

推荐答案

如小指示,您需要创建一个新的UIWindow并将其附加到UIScreen上外部显示器。此UIWindow将托管要在外部显示器上显示的内容,因此您需要为其构建一个独立的视图层次结构,与主应用程序界面分开。您还需要监听 UIScreenDidConnectNotification UIScreenDidDisconnectNotification 通知,这些通知会在连接外部显示器时通知您的应用程序删除。

As little indicates, you'll need to create a new UIWindow and attach it to the UIScreen for the external display. This UIWindow will host the content to be presented on the external display, so you'll need to build a distinct view hierarchy for that, separate from your main application interface. You also will need to listen for the UIScreenDidConnectNotification and UIScreenDidDisconnectNotification notifications that inform your application when the external display has been attached and removed.

我演示了如何在我的 iTunes U上的课程,可以查看课程笔记这里

I demonstrate how to do this in the video for the iPad session of my class on iTunes U, for which the course notes can be viewed here.

Matt Gemmell最近也写了一篇非常好的文章,您可以在这里阅读

Matt Gemmell also did a very nice writeup on this recently, which you can read here.

这篇关于将iPad内容输出到外部显示器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆