Conforms to NSObject
Declared in SGSScanUtil.h

Tasks

Instance Methods

scanner:captureSession:runtimeError:

相机运行时错误

- (void)scanner:(SGSScanUtil *)scanner captureSession:(AVCaptureSession *)session runtimeError:(nullable NSError *)error

Parameters

scanner

扫一扫工具类

session

摄像头会话

error

相机运行时错误

Declared In

SGSScanUtil.h

scanner:captureSession:wasInterrupted:

相机扫描中断,例如,被来电呼叫或警报或者控制所需硬件资源的另一程序所中断

- (void)scanner:(SGSScanUtil *)scanner captureSession:(AVCaptureSession *)session wasInterrupted:(AVCaptureSessionInterruptionReason)interruptionReason

Parameters

scanner

扫一扫工具类

session

摄像头会话

interruptionReason

终端原因枚举值

Declared In

SGSScanUtil.h

scanner:captureSessionConfigurationCompleted:previewLayer:

相机设置完毕

- (void)scanner:(SGSScanUtil *)scanner captureSessionConfigurationCompleted:(AVCaptureSession *)session previewLayer:(AVCaptureVideoPreviewLayer *)previewLayer

Parameters

scanner

扫一扫工具类

session

摄像头会话

previewLayer

相机画面预览图层

Declared In

SGSScanUtil.h

scanner:captureSessionConfigurationFailed:

相机设置错误

- (void)scanner:(SGSScanUtil *)scanner captureSessionConfigurationFailed:(AVCaptureSession *)session

Parameters

scanner

扫一扫工具类

session

摄像头会话

Declared In

SGSScanUtil.h

scanner:captureSessionDidStartRunning:

相机开始扫描

- (void)scanner:(SGSScanUtil *)scanner captureSessionDidStartRunning:(AVCaptureSession *)session

Parameters

scanner

扫一扫工具类

session

摄像头会话

Declared In

SGSScanUtil.h

scanner:captureSessionDidStopRunning:

相机停止扫描

- (void)scanner:(SGSScanUtil *)scanner captureSessionDidStopRunning:(AVCaptureSession *)session

Parameters

scanner

扫一扫工具类

session

摄像头会话

Declared In

SGSScanUtil.h

scanner:captureSessionInterruptionEnded:

- (void)scanner:(SGSScanUtil *)scanner captureSessionInterruptionEnded:(AVCaptureSession *)session
Discussion

例如,当电话呼叫结束,并且运行会话所需的硬件资源再次可用时,可在适当时机恢复相机扫描状态

Parameters

scanner

扫一扫工具类

session

摄像头会话

Declared In

SGSScanUtil.h

scanner:didFinishScan:

扫描完毕

- (void)scanner:(SGSScanUtil *)scanner didFinishScan:(NSArray<__kindofAVMetadataObject*> *)metadataObjects

Parameters

scanner

扫一扫工具类

metadataObjects

扫描结果

Declared In

SGSScanUtil.h