项目作者: tonyli508

项目描述 :
USDriverLicenseScanner is a library for scanning US driver license details from your iPhone camera.
高级语言: Swift
项目地址: git://github.com/tonyli508/USDriverLicenseScanner.git
创建时间: 2016-09-11T18:48:17Z
项目社区:https://github.com/tonyli508/USDriverLicenseScanner

开源协议:MIT License

下载


USDriverLicenseScanner

Swift
Carthage compatible

USDriverLicenseScanner is a library for scanning US driver license details from your iPhone camera.

USDriverLicenseScanner

How to use

  • Make your UIViewController conformed to ScanDriverLicenseViewControllerDelegate
  • Implement func didScanResult(driverInfo: DriverLicense) (it will be callbacked with driver license info, once scanned)
  • Show scanner view
    1. /// create
    2. let scanner = ScanDriverLicenseViewController(
    3. title: "Scan Driver License",
    4. focusDesc: "Align with the barcode on the back of your license.",
    5. detailDesc: "By adding my license, I consent to a standard driver record check, powered by Checkr")
    6. /// delegate
    7. scanner.delegate = self
    8. /// add cancel button
    9. let navigation = UINavigationController(rootViewController: scanner)
    10. scanner.navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Cancel", style: .done, target: self, action: #selector(dismissSelf))
    11. /// show
    12. self.present(navigation, animated: true, completion: nil)
    Or check out the example app.

Carthage

  1. github "tonyli508/USDriverLicenseScanner" ~> 1.0.0

Check out the example code in Carthage branch as well, if you need more details.