Latest 1.0.5
Homepage https://github.com/omaarr90/BarCodeReaderView
License MIT
Platforms ios 8.0, requires ARC
Authors

BarCodeReaderView

BarCodeReaderView is a swift class that inherits from UIView which can read Barcodes.

Installing

The prefered way to integrate BarCodeReaderView is through cocoapods.

Add pod 'BarCodeReaderView' to your Podfile.

Using it

first thing you need to import it

import BarCodeReaderView

Then you can either hook it through InterfaceBuilder, or using code as follows:

let barcodeReader = BarcodeReaderView(frame: CGRect(x: 20.0, y: 20.0, width: 200, height: 200))
self.view.addSubview(barcodeReader)

after that you just set the delegate and barcode types:

barcodeReader.delegate = self
barcodeReader.barCodeTypes = [.Code128]

for supported barcode types see supported barcode types section

delegate should implement two methods:

func barcodeReader(barcodeReader: BarcodeReaderView, didFailReadingWithError error: NSError) {
// handle error
}

func barcodeReader(barcodeReader: BarcodeReaderView, didFinishReadingString info: String) {
//handle success reading
}

once every thing ready, you call

barcodeReader.startCapturing()

and you can stop capturing by calling

barcodeReader.stopCapturing()

Supported Barcode Types

Aztec

Code128

PDF417Barcode

QR

UPCECode

Code39Code

Code39Mod43Code

EAN13Code

EAN8Code

Interleaved2of5Code

ITF14Code

DataMatrixCode

Licence

BarCodeReaderView is available under the MIT license.

Author

Omar Alshammari

@Follow me on Twitter

Bitdeli Badge

Latest podspec

{
    "name": "BarCodeReaderView",
    "version": "1.0.5",
    "summary": "This Framework allows app to read barcodes",
    "homepage": "https://github.com/omaarr90/BarCodeReaderView",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Omar Alshammari": "[email protected]"
    },
    "social_media_url": "http://twitter.com/omaarr90",
    "source": {
        "git": "https://github.com/omaarr90/BarCodeReaderView.git",
        "tag": "v1.0.5",
        "submodules": true
    },
    "source_files": "BarCodeReader/**/*.{h,swift}",
    "requires_arc": true,
    "platforms": {
        "ios": "8.0"
    }
}

Pin It on Pinterest

Share This