Instance Method


Sets white balance to locked mode with the specified deviceWhiteBalanceGains values.


- (void)setWhiteBalanceModeLockedWithDeviceWhiteBalanceGains:(AVCaptureWhiteBalanceGains)whiteBalanceGains completionHandler:(void (^)(CMTime syncTime))handler;



The white balance gains to set.

A value of AVCaptureWhiteBalanceGainsCurrent can be used to indicate that the caller does not wish to specify a value for deviceWhiteBalanceGains.


A block to be called when white balance gains have been set to the values specified and whiteBalanceMode property is AVCaptureWhiteBalanceModeLocked. The block receives a timestamp matching that of the first buffer to which all settings have been applied. The timestamp is synchronized to the device clock, and thus must be converted to the master clock before comparison with the timestamps of buffers delivered via an AVCaptureVideoDataOutput instance.

This parameter may be nil if synchronization is not required.


For each channel in the whiteBalanceGains structure, only values between 1.0 and maxWhiteBalanceGain are supported. Gain values are normalized to the minimum channel value to avoid brightness changes (for example, R:2 G:2 B:4 is normalized to R:1 G:1 B:2).

This method throws an NSInvalidArgumentException if any of the whiteBalanceGains fields are set to an unsupported level. This method throws a NSGenericException if called without first obtaining exclusive access to the receiver using lockForConfiguration:.

See Also

Managing the White Balance

- isWhiteBalanceModeSupported:

Returns a Boolean value that indicates whether the given white balance mode is supported.


The current white balance mode.


Indicates whether the devise is currently adjusting the white balance.

- chromaticityValuesForDeviceWhiteBalanceGains:

Converts device-specific white balance RGB gain values to device-independent chromaticity values.


The current device-specific RGB white balance gain values.


The maximum supported value to which a channel in the AVCaptureWhiteBalanceGains may be set.

- deviceWhiteBalanceGainsForChromaticityValues:

Converts device-independent chromaticity values to device-specific white balance RGB gain values.

- deviceWhiteBalanceGainsForTemperatureAndTintValues:

Converts device-independent temperature and tint values to device-specific white balance RGB gain values.


The current device-specific white balance values required for a neutral gray white point.

- temperatureAndTintValuesForDeviceWhiteBalanceGains:

Converts device-specific white balance RGB gain values to device-independent temperature and tint values.


A Boolean value indicating whether the device supports locking white balance to specific gain values.


A special constant representing the current white balance setting.


Structure containing RGB white balance gain values.


Structure containing CIE 1931 xy chromaticity values.


Structure containing temperature and tint values correlated to a white-balance color.


Constants to specify the white balance mode of a capture device.