Inherits from UIView
Declared in IGBarcodeView.h

Overview

The IGBarcodeView is a flexible control capable of displaying one of the 12 supported barcode types.

  • Codabar
  • Code 39
  • Code 39 Extended
  • Code 128
  • EAN-8
  • EAN-13
  • Interleaved 2 Of 5
  • Planet
  • PostNet
  • Standard 2 Of 5
  • UPC-A
  • UPC-E

Barcodes with the exception of Planet and PostNet can display their set value under the barcode using any font set through the fontName property. The barcode bar color and text color are controllable through the barcodeColor and textColor properties.

Properties

barcodeColor

The bar color of the barcode.

@property (nonatomic, retain) UIColor *barcodeColor

Discussion

The default color is black.

Declared In

IGBarcodeView.h

barcodeType

Returns the type of barcode the IGBarcodeView has been initialized with. (Read-Only)

@property (nonatomic, readonly) IGBarcodeType barcodeType

Discussion

Support barcode enumerations:

  • IGBarcodeTypeCodabar
  • IGBarcodeTypeCode39
  • IGBarcodeTypeCode39Ext
  • IGBarcodeTypeCode128
  • IGBarcodeTypeEAN8
  • IGBarcodeTypeEAN13
  • IGBarcodeTypeInterleaved2Of5
  • IGBarcodeTypePlanet
  • IGBarcodeTypePostNet
  • IGBarcodeTypeStandard2Of5
  • IGBarcodeTypeUPCA
  • IGBarcodeTypeUPCE

Declared In

IGBarcodeView.h

fontName

The font name that will be used when the IGBarcodeView is showing text.

@property (nonatomic, retain) NSString *fontName

Discussion

The default font used is, HelveticaNeue-Bold.

Declared In

IGBarcodeView.h

showText

Displays the IGBarcodeView value under the barcode.

@property (nonatomic, assign) BOOL showText

Discussion

The showText property is set to YES by default. No text value is displayed for IGBarcodeTypePlanet and IGBarcodeTypePostNet barcode types.

Declared In

IGBarcodeView.h

textColor

The text color of the IGBarcodeView when showText has been set to YES.

@property (nonatomic, retain) UIColor *textColor

Discussion

The default color is black.

Declared In

IGBarcodeView.h

value

The value displayed on the IGBarcodeView.

@property (nonatomic, readonly) NSString *value

Declared In

IGBarcodeView.h

Class Methods

createBarcode:

Static method that initializes the IGBarcodeView with the specified barcode type.

+ (IGBarcodeView *)createBarcode:(IGBarcodeType)barcodeType

Parameters

barcodeType

The IGBarcodeType to initialize with.

Return Value

The IGBarcodeView instance.

Discussion

Support barcode enumerations:

  • IGBarcodeTypeCodabar
  • IGBarcodeTypeCode39
  • IGBarcodeTypeCode39Ext
  • IGBarcodeTypeCode128
  • IGBarcodeTypeEAN8
  • IGBarcodeTypeEAN13
  • IGBarcodeTypeInterleaved2Of5
  • IGBarcodeTypePlanet
  • IGBarcodeTypePostNet
  • IGBarcodeTypeStandard2Of5
  • IGBarcodeTypeUPCA
  • IGBarcodeTypeUPCE

Declared In

IGBarcodeView.h

createBarcode:frame:

Static method that initializes the IGBarcodeView with the specified barcode type and frame.

+ (IGBarcodeView *)createBarcode:(IGBarcodeType)barcodeType frame:(CGRect)frame

Parameters

barcodeType

The IGBarcodeType to initialize with.

frame

The frame rectangle, which describes the IGBarcodeView location and size in its superview’s coordinate system.

Return Value

The IGBarcodeView instance.

Discussion

Support barcode enumerations:

  • IGBarcodeTypeCodabar
  • IGBarcodeTypeCode39
  • IGBarcodeTypeCode39Ext
  • IGBarcodeTypeCode128
  • IGBarcodeTypeEAN8
  • IGBarcodeTypeEAN13
  • IGBarcodeTypeInterleaved2Of5
  • IGBarcodeTypePlanet
  • IGBarcodeTypePostNet
  • IGBarcodeTypeStandard2Of5
  • IGBarcodeTypeUPCA
  • IGBarcodeTypeUPCE

Declared In

IGBarcodeView.h

Instance Methods

initWithBarcode:

Initializes the IGBarcodeView with the specified barcode type.

- (instancetype)initWithBarcode:(IGBarcodeType)barcodeType

Parameters

barcodeType

The IGBarcodeType to initialize with.

Return Value

The IGBarcodeView instance.

Discussion

Support barcode enumerations:

  • IGBarcodeTypeCodabar
  • IGBarcodeTypeCode39
  • IGBarcodeTypeCode39Ext
  • IGBarcodeTypeCode128
  • IGBarcodeTypeEAN8
  • IGBarcodeTypeEAN13
  • IGBarcodeTypeInterleaved2Of5
  • IGBarcodeTypePlanet
  • IGBarcodeTypePostNet
  • IGBarcodeTypeStandard2Of5
  • IGBarcodeTypeUPCA
  • IGBarcodeTypeUPCE

Declared In

IGBarcodeView.h

initWithFrame:barcodeType:

Initializes the IGBarcodeView with the specified barcode type and frame.

- (instancetype)initWithFrame:(CGRect)frame barcodeType:(IGBarcodeType)barcodeType

Parameters

frame

The frame rectangle, which describes the IGBarcodeView location and size in its superview’s coordinate system.

barcodeType

The IGBarcodeType to initialize with.

Return Value

The IGBarcodeView instance.

Discussion

Support barcode enumerations:

  • IGBarcodeTypeCodabar
  • IGBarcodeTypeCode39
  • IGBarcodeTypeCode39Ext
  • IGBarcodeTypeCode128
  • IGBarcodeTypeEAN8
  • IGBarcodeTypeEAN13
  • IGBarcodeTypeInterleaved2Of5
  • IGBarcodeTypePlanet
  • IGBarcodeTypePostNet
  • IGBarcodeTypeStandard2Of5
  • IGBarcodeTypeUPCA
  • IGBarcodeTypeUPCE

Declared In

IGBarcodeView.h

setValue:

Set the value to display on the IGBarcodeView.

- (IGBarcodeError)setValue:(NSString *)value

Parameters

value

The value to display on the IGBarcodeView.

Return Value

A return IGBarcodeError enumeration value to indicate success or error.

Discussion

The return value enumerations:

  • IGBarcodeErrorNone - The set value was validated and successfully set.
  • IGBarcodeErrorInvalidValue - The value was invalid and not set.
  • IGBarcodeErrorLength - The value length was incorrect and not set.

Declared In

IGBarcodeView.h