Instance Property

exposurePointOfInterest

The point of interest for exposure.

Declaration

var exposurePointOfInterest: CGPoint { get set }

Discussion

Setting a value for this property does not initiate an exposure rebalancing operation. To set exposure using a point of interest, first set this property's value, then set the exposureMode property to AVCaptureDevice.ExposureMode.autoExpose or AVCaptureDevice.ExposureMode.continuousAutoExposure.

This property's CGPoint value uses a coordinate system where {0,0} is the top left of the picture area and {1,1} is the bottom right. This coordinate system is always relative to a landscape device orientation with the home button on the right, regardless of the actual device orientation. You can convert between this coordinate system and view coordinates using AVCaptureVideoPreviewLayer methods.

Before changing the value of this property, 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 are done configuring the device, call unlockForConfiguration() to release the lock and allow other devices to configure the settings.

This property supports Key-value observing.

See Also

Managing Exposure Settings

var isAdjustingExposure: Bool

Indicates whether the device is currently adjusting its exposure setting.

var exposureMode: AVCaptureDevice.ExposureMode

The exposure mode for the device.

func isExposureModeSupported(AVCaptureDevice.ExposureMode) -> Bool

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

var isExposurePointOfInterestSupported: Bool

Indicates whether the device supports a point of interest for exposure.

enum AVCaptureDevice.ExposureMode

Constants to specify the exposure mode of a capture device.