问题描述
我看到TeamViewer通过利用iOS 11中控制中心的屏幕录制器功能允许iOS屏幕捕获。如下所示:
I saw that TeamViewer allows iOS Screen Capturing by leveraging the Screen Recorder feature from the Control Center in iOS 11. As seen here:
这怎么可能?我检查了ReplayKit,但找不到任何可以连接到控制中心的功能。
How is that possible? I checked out the ReplayKit, but couldn't find any feature that would hook up to the Control Center like that.
推荐答案
你需要在你的应用中添加广播上传扩展
。
You need to add a Broadcast Upload Extension
to your app.
(在Xcode中,文件>新目标,选择广播上传扩展)
(In Xcode, File > New Target, select "Broadcast Upload Extension")
一旦安装了扩展程序(与您的应用程序一起),在控制中心的屏幕录制图标上强制触摸将提供使用您的选项广播扩展,而不是默认(相机滚动)。
Once the extension is installed (alongside your app), a force-touch on the screen recording icon in control center will give the option of using your broadcast extension, instead of the default ("Camera Roll").
目前iOS屏幕录制的文档很少。但是这个WWDC视频在高层谈论它:
There is very little documentation on iOS Screen Recording right now. But this WWDC video talks about it at a high level:
这篇关于如何将iOS 11 Control Center中的屏幕截图转发到您的应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!