Skip to content

MKHGLab/MKQRScanner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MKQRScanner

CI Status Version License Platform

Example

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

Screenshots:

Sample Usage:

import UIKit
import MKQRScanner

class ViewController: UIViewController {
    @IBOutlet weak var infoLbl: UILabel!

    var scanner: MKQRScanner?
    override func viewDidLoad() {
        super.viewDidLoad()
    }
    
    @IBAction func scanTapped(_ sender: Any) {
        scanner = MKQRScanner(navigationController: navigationController, delegate: self)
        scanner?.start()
    }
}

extension ViewController: MKQRScannerDelegate {
    func scanFailed(error: Error) {
        print(#function)
        print(error)
    }

    func scanSuccessful(result: String) {
        print(result)
        infoLbl.text = result
    }
    
    func scanCanceled() {
        print(#function)
        infoLbl.text = "Scan canceled"
    }   
}

Installation

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

pod 'MKQRScanner'

Author

Md. Kamrul Hasan, mhgolap11@gmail.com

© MKHG Lab, mkhglab@gmail.com

License

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

About

A lightweight and straight forward QR and Bar code scanner

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors