A barcode and qr code scanner (二维码、扫码、扫一扫、ZXing、ZBar、iOS系统AVFoundation扫码封装,扫码界面效果封装)
MIT License
可独立安装某一功能,ZXing已经下载到本工程,解决之前版本下载速度慢的问题
pod 'LBXScan/All',git:'https://github.com/MxABC/LBXScan.git', tag: '2.0'
pod 'LBXScan/LBXNative',git:'https://github.com/MxABC/LBXScan.git', tag: '2.0'
pod 'LBXScan/LBXZXing',git:'https://github.com/MxABC/LBXScan.git', tag: '2.0'
pod 'LBXScan/LBXZBar',git:'https://github.com/MxABC/LBXScan.git', tag: '2.0'
pod 'LBXScan/UI',git:'https://github.com/MxABC/LBXScan.git', tag: '2.0'
你可以通过上面的安装方式,安装任意组合
- (void)custom
{
//设置扫码区域参数
LBXScanViewStyle *style = [[LBXScanViewStyle alloc]init];
style.centerUpOffset = 44;
//扫码框周围4个角的类型设置为在框的上面
style.photoframeAngleStyle = LBXScanViewPhotoframeAngleStyle_On;
//扫码框周围4个角绘制线宽度
style.photoframeLineW = 6;
//扫码框周围4个角的宽度
style.photoframeAngleW = 24;
//扫码框周围4个角的高度
style.photoframeAngleH = 24;
//显示矩形框
style.isNeedShowRetangle = YES;
//动画类型:网格形式,模仿支付宝
style.anmiationStyle = LBXScanViewAnimationStyle_NetGrid;
//网格图片
style.animationImage = [UIImage imageNamed:@"CodeScan.bundle/qrcode_scan_part_net"];;
//码框周围4个角的颜色
style.colorAngle = [UIColor colorWithRed:65./255. green:174./255. blue:57./255. alpha:1.0];
//矩形框颜色
style.colorRetangleLine = [UIColor colorWithRed:247/255. green:202./255. blue:15./255. alpha:1.0];
//非矩形框区域颜色
style.notRecoginitonArea = [UIColor colorWithRed:0 green:0 blue:0 alpha:0.6];
}