今天讲一讲SGQRCode的框架的使用与学习
该框架的地址:https://github.com/kingsic/SGQRCode.git
该框架简单好用,容易上手。
初次碰到这个框架的人,可以看看附件中example中SGQRCodeScanningVC控制器的用法,

image.png
该example中代码比较规范与齐全。
该框架本质上使用的是ImageIO/ImageIO.h文件中系统类
@interface SGQRCodeScanManager () <AVCaptureMetadataOutputObjectsDelegate, AVCaptureVideoDataOutputSampleBufferDelegate>
@property (nonatomic, strong) AVCaptureSession *session;
@property (nonatomic, strong) AVCaptureVideoDataOutput *videoDataOutput;
@property (nonatomic, strong) AVCaptureVideoPreviewLayer *videoPreviewLayer;
其中类的结构图如下所示:

image.png
开发中,可以使用SGQRCodeScanningVC来进行改造开发。