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"
}
}
MKQRScanner is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'MKQRScanner'
Md. Kamrul Hasan, [email protected]
© MKHG Lab, [email protected]
MKQRScanner is available under the MIT license. See the LICENSE file for more info.