All Projects → kingsic → Sgqrcode

kingsic / Sgqrcode

Licence: apache-2.0
The easy to use bar code and QR code scan library for iOS【支持二维码生成、从相册中读取二维码、条形码和二维码扫描】

Programming Languages

objective c
16641 projects - #2 most used programming language
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to Sgqrcode

Barcodescanner.xf
Barcode Scanner using GoogleVision API for Xamarin Form
Stars: ✭ 82 (-94.78%)
Mutual labels:  qrcode, barcode
Czxing
C++ port of ZXing and ZBar for Android.
Stars: ✭ 854 (-45.64%)
Mutual labels:  qrcode, barcode
Efqrcode
A better way to operate QR Code in Swift, support iOS, macOS, watchOS and tvOS.
Stars: ✭ 4,121 (+162.32%)
Mutual labels:  qrcode, barcode
Swiftscan
A barcode and qr code scanner( 二维码/条形码扫描、生成,仿微信、支付宝)
Stars: ✭ 293 (-81.35%)
Mutual labels:  qrcode, barcode
Symbology
🔖 Node.js module that generates 1D and 2D barcodes in png, eps, and svg formats. Supports over 50 symbologies.
Stars: ✭ 62 (-96.05%)
Mutual labels:  qrcode, barcode
Stegastamp
Invisible Hyperlinks in Physical Photographs
Stars: ✭ 306 (-80.52%)
Mutual labels:  qrcode, barcode
Zxingview
👍 Lowest cost integration and most convenient customization zxing on android
Stars: ✭ 23 (-98.54%)
Mutual labels:  qrcode, barcode
koder
QR/bar code scanner for the Browser
Stars: ✭ 73 (-95.35%)
Mutual labels:  qrcode, barcode
Library
Multi-format 1D/2D barcode image processing library, usable in JavaScript ecosystem.
Stars: ✭ 1,006 (-35.96%)
Mutual labels:  qrcode, barcode
Qr Code Scanner
📠 A simple, fast and useful progressive web application
Stars: ✭ 982 (-37.49%)
Mutual labels:  qrcode, barcode
Zzyqrcodeswift
a scanner for QRCode barCode 最好用的ios二维码、条形码,扫描、生成框架,支持闪光灯,从相册获取,扫描音效等,高仿微信,微博
Stars: ✭ 97 (-93.83%)
Mutual labels:  qrcode, barcode
Scannermapp
A QR-code and barcode acanner app built in Delphi using ZXing and TFrameStand
Stars: ✭ 65 (-95.86%)
Mutual labels:  qrcode, barcode
Roundcode
Custom rounded QR code with lots of customization.
Stars: ✭ 267 (-83%)
Mutual labels:  qrcode, barcode
Qzxing
Qt/QML wrapper library for the ZXing library. 1D/2D barcode image processing library
Stars: ✭ 401 (-74.47%)
Mutual labels:  qrcode, barcode
garden.zbarcam
Migrated to https://github.com/kivy-garden/zbarcam
Stars: ✭ 49 (-96.88%)
Mutual labels:  qrcode, barcode
Td Angular Barcode
Barcode Generator for Angular 1 (Supports 90+ barcode types: qr, aztec, code128, ean, isbn, interleaved2of5, ...)
Stars: ✭ 22 (-98.6%)
Mutual labels:  qrcode, barcode
r scan
📷🖨Flutter二维码&条形码扫描插件,支持相机、文件、链接、Uint8List类型扫描
Stars: ✭ 108 (-93.13%)
Mutual labels:  qrcode, barcode
barcode scan2
[reborned barcode_scan] A flutter plugin for reading 2D barcodes and QR codes.
Stars: ✭ 43 (-97.26%)
Mutual labels:  qrcode, barcode
Barcode
a barcode creation lib for golang
Stars: ✭ 953 (-39.34%)
Mutual labels:  qrcode, barcode
Blabel
🏷 Python label/sticker PDF generation. HTML templates, built-in barcodes, qr codes, and other goodies
Stars: ✭ 63 (-95.99%)
Mutual labels:  qrcode, barcode

SGQRCode

  • QQ群:825339547

  • 注意:3.5.1 版本重构:API 功能的拓展及扫码识别优化

主要内容的介绍

  • 生成二维码

  • 扫描二维码

  • 从相册中读取二维码

  • 根据光线强弱开启手电筒

  • 扫描成功之后界面之间逻辑跳转处理

  • 扫描界面可自定义(线扫描条样式以及网格样式)

  • 扫描界面仿微信(请根据项目需求,自行布局或调整)

SGQRCode 集成

  • 1、CocoaPods 导入 pod 'SGQRCode', '~> 3.5.1'

  • 2、下载、拖拽 “SGQRCode” 文件夹到工程中

代码介绍 (详细使用,请参考 Demo)

1、在 info.plist 中添加以下字段(iOS 10 之后需添加的字段)

  • NSCameraUsageDescription (相机权限访问)

  • NSPhotoLibraryUsageDescription (相册权限访问)

2、二维码扫描

    /// 创建二维码扫描类
    scanCode = [SGScanCode scanCode];
    
    /// 二维码扫描回调方法
    [scanCode scanWithController:self resultBlock:^(SGScanCode *scanCode, NSString *result) {
        <#code#>
    }];
    
    /// 开启二维码扫描回调方法: 需手动开启
    [scanCode startRunningWithBefore:^{
        // 在此可添加 HUD
    } completion:^{
        // 在此可移除 HUD
    }];
    
    /// 外界光线强弱值回调方法
    [scanCode scanWithBrightnessBlock:^(SGScanCode *scanCode, CGFloat brightness) {
        <#code#>
    }];
    
    /// 从相册中读取二维码回调方法    
    [scanCode readWithResultBlock:^(SGScanCode *scanCode, NSString *result) {
        <#code#>
    }];

3、二维码生成

    /// 常规二维码
    _imageView.image = [SGCreateCode createQRCodeWithData:@"https://github.com/kingsic" size:size];
    
    /// 带 logo 的二维码
    _imageView.image = [SGCreateCode createQRCodeWithData:@"https://github.com/kingsic" size:size logoImage:logoImage ratio:ratio];

效果图

问题及解决方案

  • 若在使用 CocoaPods 安装第三方时,出现 [!] Unable to find a specification for SGQRCode 提示时,打开终端先输入 pod repo remove master;执行完毕后再输入 pod setup 即可 (可能会等待一段时间)

  • 参考资料 iOS 从相册中读取条形码/二维码遇到的问题

  • 3.5.0 版本支持 9.0+,之前的版本支持 8.0+(iOS 扫描支持 7.0+;从相册中读取二维码支持 8.0+)

更新介绍

  • 2016-09-30 :新增从相册中读取二维码功能

  • 2016-10-27 :解决从相册中读取二维码,取消选择返回时,图层卡死问题(修改了创建扫描边框问题)

  • 2017-01-29 :对扫描二维码部分代码的封装;扫描视图布局采用 CALayer

  • 2017-03-21 :v2.0.0 使用继承的思想进行二维码扫描管理

  • 2017-05-16 :v2.0.5 使用封装的思想进行二维码扫描管理

  • 2017-06-26 :v2.1.0 加入 CocoaPods 管理

  • 2017-08-17 :v2.1.5 新增根据光线强弱判断是否打开手电筒

  • 2017-08-23 :v2.1.6 扫描界面使用 UIBezierPath 布局且可根据不同需求实现自定义(扫描线条以及网格样式)

  • 2018-02-08 :v2.2.0 新增新浪微博示例、新增从相册中读取二维码失败回调函数以及分类名称的更换

  • 2018-11-09 :v3.0.0 版本重构:Block 取代 Delegate,更多内容请在 releases 中查看

  • 2018-11-27 :v3.0.1 SGQRCodeObtain 类中新增二维码生成方法

  • 2021-05-30 :v3.5.0 版本重构:API 功能的拓展及扫码识别优化,更多内容请在 releases 中查看

  • 2021-07-05 :v3.5.1 版本重构:修复 #163 问题,更多内容请在 releases 中查看

License

SGQRCode is released under the Apache License 2.0. See LICENSE for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].