微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

swift3 – 现在可以在iOS 11上录制屏幕吗?

今天我看到一些 videos,苹果提供了在控制中心录制屏幕的选项.

我很好奇它是否也可供开发人员使用?

我用谷歌搜索,但没有找到任何与此相关的文档.有人可以对这个话题有所了解.

根据api文档中的新更新,您可以捕获Video&仅通过您的应用程序的屏幕音频.

RPScreenRecorder:共享记录器对象,提供记录应用程序的音频和视频的功能.

通过本课程,您可以录制您的应用程序屏幕,并通过iPhone麦克风绑定Audion.

以下是一些可用于记录具有不同不同选项的屏幕的方法.

访问共享记录器:

class func shared()

控制应用程序录制:

-- Starts recording the app display.
func startRecording(handler: ((Error?) -> Void)? = nil)

-- Stops the current recording.
func stopRecording(handler: ((RPPreviewViewController?,Error?) -> Void)? = nil)

-- Starts screen and audio capture.
func startCapture(handler: ((CMSampleBuffer,RPSampleBufferType,Error?) -> Void)?,completionHandler: ((Error?) -> Void)? = nil)

-- Stops screen capture
func stopCapture(handler: ((Error?) -> Void)? = nil)

希望这可以帮助您捕捉应用中的屏幕.

参考链接https://developer.apple.com/documentation/replaykit/rpscreenrecorder

Doc Ref:https://developer.apple.com/library/content/releasenotes/General/WhatsNewIniOS/Articles/iOS_11_0.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐