Using AVCapturePhotoOutput in iOS10 - NSGenericException

泄露秘密 提交于 2019-12-01 13:41:20

Code Error.

Which should be

if (captureSession?.canAddOutput(stillImageOutput))!{
      captureSession?.addOutput(stillImageOutput)
}

For anyone else that may be trying to figure this out, the following resources helped me:

For reference and code layout

SnapChat: Camera 1

SnapChat: Camera 2

Actual implementation and usage of new iOS10 Camera features

AV Foundation: iOS 10

iOS Custom Camera

change AVCaptureSessionPreset1920x1080 to AVCaptureSessionPresetHigh

try it

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!