Latest 0.1.0
Homepage https://github.com/Lasithih/LIHQRScanner
License MIT
Platforms ios 8.0, requires ARC
Authors

[![CI Status](http://img.shields.io/travis/Lasith Hettiarachchi/LIHQRScanner.svg?style=flat)](https://travis-ci.org/Lasith Hettiarachchi/LIHQRScanner)
Version
License
Platform

Installation

LIHQRScanner is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "LIHQRScanner"

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

Step 1

Declare an instance of LIHQRScanner

private var qrScanner: LIHQRScanner?

Step 2

Add the following code inside viewDidLoad method

self.qrScanner = LIHQRScanner()
self.qrScanner?.delegate = self

Step 3

Add the following code inside viewDidLayoutSubviews method

self.qrScanner?.initialize(videoContainer: self.scannerContainer)
self.qrScanner?.startSession(nil)

Step 4

Implement from LIHQRScannerDelegate

class ViewController: UIViewController, LIHQRScannerDelegate

Step 5

override qrDetected method

func qrDetected(qrString: String?, error: NSError?) {

    if let qrCode = qrString {
        print(qrCode)
    }
}

Requirements

iOS 8.0+

Known Issues

Only supports for portrait yet.

Author

Lasith Hettiarachchi, [email protected]

License

LIHQRScanner is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "LIHQRScanner",
    "version": "0.1.0",
    "summary": "Simplified QR code scanner for iOS",
    "description": "Simplified QR code scanner for iOS written in Swift",
    "homepage": "https://github.com/Lasithih/LIHQRScanner",
    "license": "MIT",
    "authors": {
        "Lasith Hettiarachchi": "[email protected]"
    },
    "source": {
        "git": "https://github.com/Lasithih/LIHQRScanner.git",
        "tag": "0.1.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes/**/*",
    "resource_bundles": {
        "LIHQRScanner": [
            "Pod/Assets/*.png"
        ]
    }
}

Pin It on Pinterest

Share This