升级Swift4.0扫描二维码不回调

代理AVCaptureMetadataOutputObjectsDelegate的回调函数已被重命名:

所以,替换

func captureOutput(_ captureOutput: AVCaptureOutput!, didOutputMetadataObjects metadataObjects: [Any]!, from connection: AVCaptureConnection!)

func metadataOutput(_ output: AVCaptureMetadataOutput, didOutput metadataObjects: [AVMetadataObject], from connection: AVCaptureConnection)

你可能感兴趣的:(升级Swift4.0扫描二维码不回调)