iOS 应用镜像 "Screen Saver"

标签 ios objective-c ipad mirroring

我需要将我的 iPad 应用程序完全按照它在设备上运行的方式镜像到外部屏幕上,但在一段时间不事件后,外部屏幕应显示静态图像,直到设备再次接收触摸输入。我今天阅读了很多关于在 iOS 中处理多个屏幕的内容,但找不到解决方案。

是否有可能实现这样的目标,如果是,如何实现?

最佳答案

一句话概括:你可以在外部屏幕上使用 UIViews,就像在主屏幕上一样。

报价在外部显示器上显示内容 部分来自 Apple View Programming Guide

The process for displaying content on an external display is described in the following sections. However, the following steps summarize the basic process:

  1. At application startup, register for the screen connection and disconnection notifications.
  2. When it is time to display content on the external display, create and configure a window. Use the screens property of UIScreen to obtain the screen object for the external display. Create a UIWindow object and size it appropriately for the screen (or for your content). Assign the UIScreen object for the external display to the screen property of the window. Adjust the resolution of the screen object as needed to support your content. Add any appropriate views to the window.
  3. Show the window and update it normally.


Apple 的开发人员文档提供了所有必需的信息(包括示例):http://developer.apple.com/library/ios/#documentation/windowsviews/conceptual/viewpg_iphoneos/CreatingWindows/CreatingWindows.html

关于iOS 应用镜像 "Screen Saver",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15030566/

相关文章:

iphone - UIImageView setImage 泄漏?

ios - Xcode 5 "Invalid Code Signing Entitlements"错误

objective-c - AVQueuePlayer/AVPlayer 加载通知?

objective-c - 如何避免GC环境中自定义NSURLProtocol中_NSCFURLProtocolBridge中的引用计数下溢

ios - 带有视频和照片内容的 JSQMessage

ios - 你能设置 RootViewController 的动画吗?

iphone - 核心数据 - 为什么不自动设置反向关系?

ios - IOS 13.2.3版本TextField文本不显示如何解决?

ios - TableView :didSelectRowAtIndexPath/popViewControllerAnimated do not work

objective-c - 在预先存在的数据上设置关系是否可能?