【发布时间】:2019-08-24 00:42:44
【问题描述】:
在我的应用程序中,我创建了一个自定义相机视图用于图像捕捉。 当我触发捕获时,我使用以下代码:
private func takePhoto() {
let settings = AVCapturePhotoSettings()
self.stillImageOutput.capturePhoto(with: settings, delegate: self)
}
这会触发photoOutput didFinishProcessingPhoto
我从AVCapturePhoto 中提取UIImage 并继续。
我的问题在我调用self.stillImageOutput.capturePhoto 和图像到达didFinishProcessingPhoto 之间,平均通过 0.5 秒,我需要捕获图像(几乎)恰好在调用capturePhoto 的时间。
有没有办法加快这个过程,或者有其他方法可以达到同样的效果吗?
【问题讨论】:
标签: ios swift avcapturesession avcapturephotooutput