gpt4 book ai didi

iOS 应用镜像 "Screen Saver"

转载 作者:行者123 更新时间:2023-12-01 16:51:47 26 4
gpt4 key购买 nike

我需要将我的 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/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com