Instance Property

metadataObjectTypes

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

Declaration

@property(nonatomic, copy) NSArray<AVMetadataObjectType> *metadataObjectTypes;

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 captureOutput:didOutputMetadataObjects:fromConnection: 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 captureOutput:didOutputMetadataObjects:fromConnection: 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

availableMetadataObjectTypes

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

rectOfInterest

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