AVCaptureMetadataOutputObjectsDelegate Protocol Reference
| Conforms to | |
| Framework | /System/Library/Frameworks/AVFoundation.framework |
| Availability | Available in iOS 6.0 and later. |
| Declared in | AVCaptureOutput.h |
Overview
The delegate of an AVCaptureMetadataOutput object must adopt the AVCaptureMetadataOutputObjectsDelegate protocol. The single method in this protocol is optional. It allows a delegate to respond when a capture metadata output object receives relevant metadata objects through its connection.
The AVCaptureMetadataOutput object calls the methods of your delegate object on the dispatch queue associated with its metadataObjectsCallbackQueue property.
Instance Methods
captureOutput:didOutputMetadataObjects:fromConnection:
Tells the delegate that the capture metadata output object emitted new metadata objects.
Parameters
- captureOutput
The
AVCaptureMetadataOutputobject that captured and emitted the metadata objects.- metadataObjects
An array of
AVMetadataObjectinstances representing the newly emitted metadata. BecauseAVMetadataObjectis an abstract class, the objects in this array are always instances of a concrete subclass.- connection
The capture connection through which the objects were emitted.
Discussion
The AVCaptureMetadataOutput object emits only metadata objects whose types are included in its metadataObjectTypes property. Your delegate can implement this method and use it to perform additional processing on those metadata objects as they become available. If you plan to use metadata objects outside of the scope of this method, you must store strong references to them and remove those references when you no longer need the objects.
This method is executed on the dispatch queue specified by the metadataObjectsCallbackQueue property of the capture metadata output object. Because this method may be called frequently, your implementation should be efficient to prevent capture performance problems, including dropped metadata objects.
Availability
- Available in iOS 6.0 and later.
Declared In
AVCaptureOutput.h© 2012 Apple Inc. All Rights Reserved. (Last updated: 2012-09-19)