Class

CIBarcodeDescriptor

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

Declaration

class 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

class CIQRCodeDescriptor

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

class CIAztecCodeDescriptor

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

class CIPDF417CodeDescriptor

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

class CIDataMatrixCodeDescriptor

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

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software