Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // ViewController.swift
- // BRSwiftDemo
- //
- // Created by Danny Panzer on 10/23/17.
- // Copyright © 2017 BlinkReceipt. All rights reserved.
- //
- import UIKit
- import BlinkReceipt
- class ViewController: UIViewController, BRScanResultsDelegate {
- override func viewDidLoad() {
- super.viewDidLoad()
- BRScanManager.shared().licenseKey = "Your license key here"
- }
- @IBAction func btnScanTouched(_ sender: UIButton) {
- let scanOptions = BRScanOptions()
- scanOptions.retailerId = WFRetailerId.unknown
- BRScanManager.shared().startStaticCamera(from: self, scanOptions: scanOptions, with: self)
- }
- func didFinishScanning(_ cameraViewController: UIViewController!, with scanResults: BRScanResults!) {
- cameraViewController.dismiss(animated: true, completion: nil)
- //process scanResults object
- }
- func didCancelScanning(_ cameraViewController: UIViewController!) {
- cameraViewController.dismiss(animated: true, completion: nil)
- }
- }
Add Comment
Please, Sign In to add comment