Skip to content

Latest commit

 

History

History
65 lines (43 loc) · 1.81 KB

README.md

File metadata and controls

65 lines (43 loc) · 1.81 KB

BarcodeReader

CI Status Version License Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Screenshots

Implementation

Simply create a UIView in interface builder and assign custom class BarcodeReaderView.

Then

import UIKit
import BarcodeReader

class ViewController: UIViewController, BarcodeReaderDelegate {

    @IBOutlet weak var barcodeReader: BarcodeReaderView!
    @IBOutlet weak var outputLabel: UILabel!

    override func viewDidLoad() {
        super.viewDidLoad()
        barcodeReader.delegate = self
    }

    override func viewDidAppear(_ animated: Bool) {
        super.viewDidDisappear(animated)
        barcodeReader.startReader()
    }

    // MARK: - BarcodeReaderDelegate
    func barcodeOutput(string: String?) {
        outputLabel.text = string
    }
}

Installation

BarcodeReader is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "BarcodeReader"

Author

tmukammel, [email protected]

License

BarcodeReader is available under the MIT license. See the LICENSE file for more info.