Latest 1.0.0
License MIT
Platforms ios 8.0, requires ARC

Using the system API (AVFoundation) for packaging, including the UI interface and QR code, barcode scanning, generating and other operations

Objective-C Version: ZZYQRCode


HOW to install

platform :ios, '8.0'
pod 'ZZYQRCodeSwift', '~> 1.0.0'

How to use

  1. Create sessionManager
let session = AVCaptureSessionManager(captureType: .AVCaptureTypeBoth, scanRect: CGRect.null, success: SuccessBlock)
  1. Show view
session.showPreViewLayerIn(view: view)

Others features

  1. Scan sound effects
var isPlaySound = false

var soundName:String?
  1. Torch
session.turnTorch(state: torchState)
  1. Scan the QR code in the album
session.scanPhoto(image: UIImage, success: SuccessBlock)
  1. Check authorization status
class func checkAuthorizationStatusForCamera(grant:@escaping GrantBlock, denied:DeniedBlock)
  1. Create QR code
let image = UIImage.createQRCode(size: 200, dataStr: "hello")
  1. Create customize QR code
let image = UIImage(named: "bigMax")
QRImage.image = UIImage.createCustomizeQRCode(size: 200,
                                           dataStr: "hello",
                                         imageType: .CircularImage,
                                         iconImage: image!,
                                     iconImageSize: 40)

Pay attention

Because of iOS10 authorization change,you need to add code in your info.plist


Page show

Latest podspec

    "name": "ZZYQRCodeSwift",
    "version": "1.0.0",
    "license": "MIT",
    "summary": "A Scan QRCode Or BarCode Framework on iOS.",
    "homepage": "",
    "authors": {
        "u5f20u6cfdu5b87": "[email protected]"
    "source": {
        "git": "",
        "tag": "1.0.0"
    "requires_arc": true,
    "platforms": {
        "ios": "8.0"
    "source_files": "ZZYQRCodeSwift/ZZYQRCodeSwift/*.{swift}",
    "resources": "ZZYQRCodeSwift/ZZYQRCodeSwift/ZZYQRCode.bundle",
    "pushed_with_swift_version": "3.0"

Pin It on Pinterest

Share This