Instance Property


Indicates whether the device should monitor the subject area for changes.


var isSubjectAreaChangeMonitoringEnabled: Bool { get set }


The value of this property indicates whether the receiver should monitor the video subject area for changes, such as lighting changes, substantial movement, and so on. If subject area change monitoring is enabled, the capture device object sends an AVCaptureDeviceSubjectAreaDidChange whenever it detects a change to the subject area, at which time an interested client may wish to re-focus, adjust exposure, white balance, etc.

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.

You can observe changes to the value of this property using Key-value observing.

See Also

Monitoring Subject Area Change

static let AVCaptureDeviceSubjectAreaDidChange: NSNotification.Name

Posted when the instance of AVCaptureDevice has detected a substantial change to the video subject area.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software