Instance Property

metadataObjectTypes

An array of strings identifying the types of metadata objects to process.

Declaration

var metadataObjectTypes: [AVMetadataObject.ObjectType]! { get set }

Discussion

This property is used to filter the metadata objects reported by the receiver. Only metadata objects whose type matches one of the strings in this property are forwarded to the delegate’s metadataOutput(_:didOutput:from:) method for processing.

When assigning a new array to this property, each of the type strings must be present in the array returned by the availableMetadataObjectTypes property; otherwise, the receiver raises anNSException.

The default is an empty NSArray object, and as a result, no metadata objects are forwarded to the delegate’s metadataOutput(_:didOutput:from:) method. The same result can be achieved by setting the property to nil. This default behavior maximizes both performance and battery life.

See Also

Configuring Metadata Capture

var availableMetadataObjectTypes: [AVMetadataObject.ObjectType]

An array of strings identifying the types of metadata objects that can be captured.

var rectOfInterest: CGRect

A rectangle of interest for limiting the search area for visual metadata.

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