Class

CIBarcodeDescriptor

An abstract base class that represents a machine readable code's attributes.

Declaration

@interface CIBarcodeDescriptor : NSObject

Overview

Subclasses encapsulate the formal specification and fields specific to a code type. Each subclass is sufficient to recreate the unique symbol exactly as seen or used with a custom parser.

Listing 1

Creating a CIImage from a CIBarcodeDescriptor

- (CIImage*) imageFromBarcodeDescriptor:(CIBarcodeDescriptor*)descriptor
{
    NSDictionary* inputParams = @{
                                  @"inputBarcodeDescriptor" : descriptor
                                  };
    CIFilter* barcodeCreationFilter = [CIFilter filterWithName:@"CIBarcodeGenerator" withInputParameters:inputParams];
    CIImage* outputImage = barcodeCreationFilter.outputImage;
    return outputImage;
}

Relationships

Inherits From

See Also

Barcode Descriptions

CIQRCodeDescriptor

A concrete subclass of CIBarcodeDescriptor that represents a square QR code symbol.

CIAztecCodeDescriptor

A concrete subclass of CIBarcodeDescriptor that represents an Aztec code symbol.

CIPDF417CodeDescriptor

A concrete subclass of CIBarcodeDescriptor that represents a PDF 417 symbol.

CIDataMatrixCodeDescriptor

A concrete subclass of CIBarcodeDescriptor that represents a Data Matrix code symbol.