Contents

setExposureTargetBias(_:completionHandler:)

Sets the bias to apply to the target exposure value.

Declaration

func setExposureTargetBias(_ bias: Float, completionHandler handler: (@Sendable (CMTime) -> Void)? = nil)
func setExposureTargetBias(_ bias: Float) async -> CMTime

Parameters

  • bias:

    The bias to apply to the exposure target value.

  • handler:

    A callback the system invokes when the adjustment to the exposure target bias is complete. If you call this method multiple times, the system calls the completion handlers in FIFO order.

    The system passes a time value that matches that of the first buffer to which its applied all settings. It synchronizes the timestamp to the device clock, and you must convert the timestamp to the Synchronizationclock prior to comparison with the timestamps of buffers delivered through an Avcapturevideodataoutput.

    You can pass nil for this parameter if you don’t require this information.

Discussion

Before changing the value the lens position, you must call lockForConfiguration() to acquire exclusive access to the device’s configuration properties. Otherwise, setting the value of this property raises an exception. When you finish configuring the device, call unlockForConfiguration() to release the lock and allow other devices to configure the settings.

See Also

Adjusting exposure compensation