Skip to content

Latest commit

 

History

History
70 lines (50 loc) · 1.93 KB

README.md

File metadata and controls

70 lines (50 loc) · 1.93 KB

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.