Guest User

Untitled

a guest
Oct 24th, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. //
  2. // ViewController.swift
  3. // BRSwiftDemo
  4. //
  5. // Created by Danny Panzer on 10/23/17.
  6. // Copyright © 2017 BlinkReceipt. All rights reserved.
  7. //
  8.  
  9. import UIKit
  10. import BlinkReceipt
  11.  
  12. class ViewController: UIViewController, BRScanResultsDelegate {
  13.  
  14. override func viewDidLoad() {
  15. super.viewDidLoad()
  16.  
  17. BRScanManager.shared().licenseKey = "Your license key here"
  18. }
  19.  
  20. @IBAction func btnScanTouched(_ sender: UIButton) {
  21. let scanOptions = BRScanOptions()
  22. scanOptions.retailerId = WFRetailerId.unknown
  23. BRScanManager.shared().startStaticCamera(from: self, scanOptions: scanOptions, with: self)
  24. }
  25.  
  26. func didFinishScanning(_ cameraViewController: UIViewController!, with scanResults: BRScanResults!) {
  27. cameraViewController.dismiss(animated: true, completion: nil)
  28.  
  29. //process scanResults object
  30. }
  31.  
  32. func didCancelScanning(_ cameraViewController: UIViewController!) {
  33. cameraViewController.dismiss(animated: true, completion: nil)
  34. }
  35. }
Add Comment
Please, Sign In to add comment