Skip to content

kamrul-cse/MKQRScanner

 
 

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, [email protected]

© MKHG Lab, [email protected]

License

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 86.3%
  • Ruby 8.6%
  • Objective-C 5.1%