Latest 1.2.0
Homepage https://github.com/thefind/TFBarcodeScanner
License MIT
Platforms ios 7.0, requires ARC
Authors

pod badge

Scan barcodes with elegance and ease

screenshot

iOS provides barcode scanning as part of the AV Framework, but it takes some work to
figure it all out and then set it up to be efficient and robust. TFBarcodeScanner makes
it super easy: create a view controller subclass of TFBarcodeScannerViewController,
override barcodeWasScanned, and you are scanning barcodes!

Installation

We recommend using CocoaPods to install TFBarcodeScanner. Add to your Podfile:

pod 'TFBarcodeScanner'

To install manually, add TFBarcodeScanner to your project as a subproject, and
then add the TFBarcodeScanner static library in your project’s Build Phases.

Usage

  1. Create a view controller that is subclassed from TFBarcodeScannerViewController.
    Make sure that your subviews have a transparent region so the preview is visible.
  2. In your viewDidLoad method, optionally set the barcodeTypes bit flag to whatever
    barcode types you want to scan.
  3. Override the barcodeWasScanned method. This returns a set of barcodes that were
    recognized. You normally will call stop once a suitable barcode is recognized.
  4. If you have UI elements that you want to overlay on top of the scanning preview,
    override barcodePreviewWillShowWithDuration and show the elements in this method. You
    will also want to override barcodePreviewWillHideWithDuration to hide these same
    elements.

See the Demo for sample code.

Notes

Requires iOS 7 or greater.

Latest podspec

{
    "name": "TFBarcodeScanner",
    "version": "1.2.0",
    "summary": "Scan barcodes in iOS with elegance and ease",
    "description": "Barcode scanning is part of the AV Framework, but it takesnsome work to figure it all out and then set it up to be efficient and robust. TFBarcodeScannernmakes it super easy: create a view controller subclass of `TFBarcodeScannerViewController`,noverride `barcodeWasScanned`, and you are scanning barcodes!",
    "homepage": "https://github.com/thefind/TFBarcodeScanner",
    "screenshots": "https://raw.githubusercontent.com/thefind/TFBarcodeScanner/master/Screenshots/screenshot.png",
    "license": "MIT",
    "authors": {
        "phatmann": "[email protected]"
    },
    "social_media_url": "http://twitter.com/thephatmann",
    "platforms": {
        "ios": "7.0"
    },
    "source": {
        "git": "https://github.com/thefind/TFBarcodeScanner.git",
        "tag": "1.2.0"
    },
    "source_files": "TFBarcodeScanner",
    "requires_arc": true
}

Pin It on Pinterest

Share This