Latest 0.0.3
Homepage https://github.com/zerozheng/ZZQRCode
License MIT
Platforms ios 8.0

Description

简单的二维码扫描器,不仅可以扫描二维码,生成二维码,还可以直接识别图片中的二维码

License
Platform
Swift

ZZQRCode
ZZQRCode

Usage

    weak var delegate: ScanVCDelegate?

    var qrScaner: QRScaner?

    override func viewDidLoad() {
        super.viewDidLoad()
        let qrScanView: QRScanView = QRScanView(frame: self.view.bounds)

        self.qrScaner = QRScaner(view: qrScanView, didFoundResultHandle: { [unowned self] (string) in

            let _ = self.navigationController?.popViewController(animated: true)

            if let delegate = self.delegate, delegate.responds(to: #selector(ScanVCDelegate.scanVC(vc:didFoundResult:))) {
                delegate.scanVC(vc: self, didFoundResult: string)
            }

        })

        if let qrScaner = self.qrScaner {
            self.view.addSubview(qrScanView)
            qrScaner.startScanning()
        }
    }

Installation

pod 'ZZQRCode',    '~> 0.0.3'

Latest podspec

{
    "name": "ZZQRCode",
    "version": "0.0.3",
    "summary": "ZZQRCode, detect or generate a qrcode",
    "description": "A qrcode framework, which is simple and easy for using, to detect or generate qrCode",
    "homepage": "https://github.com/zerozheng/ZZQRCode",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": "zero",
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/zerozheng/ZZQRCode.git",
        "tag": "0.0.3"
    },
    "source_files": "Source"
}

Pin It on Pinterest

Share This