setDelegate(_:queue:)
Assigns a delegate to receive real-time timecode updates and specifies a queue for callbacks.
Declaration
func setDelegate(_ delegate: (any AVCaptureTimecodeGeneratorDelegate)?, queue callbackQueue: dispatch_queue_t?)Parameters
- delegate:
An object conforming to the Avcapturetimecodegeneratordelegate protocol.
- callbackQueue:
The dispatch queue on which the delegate methods are invoked. The
callbackQueueparameter may not benil, except when setting the Avcapturetimecodegeneratordelegate tonil, otherwise Setdelegate(_:queue:) throws anNSInvalidArgumentException.
Discussion
Use this method to configure a delegate that handles timecode updates. The specified queue ensures thread-safe invocation of delegate methods.