Enumeration

AVCaptureDevice.AutoFocusRangeRestriction

Constants to specify the autofocus range of a capture device.

Declaration

enum AutoFocusRangeRestriction : Int

Overview

If you expect to focus primarily on near or far objects, you can use the autoFocusRangeRestriction property to provide a hint to the focusing system. This approach makes autofocus faster, more power efficient, and less error prone. A restriction prioritizes focusing at distances in the specified range, but does not prevent focusing elsewhere if the device finds no focus point within that range.

Topics

Constants

case none

The device attempts to focus on objects at any range.

case near

The device primarily attempts to focus on subjects near the camera.

case far

The device primarily attempts to focus on subjects far away from the camera.

See Also

Managing Focus Settings

func isFocusModeSupported(AVCaptureDevice.FocusMode) -> Bool

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

var focusPointOfInterest: CGPoint

The point of interest for focusing.

var isFocusPointOfInterestSupported: Bool

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

var isAdjustingFocus: Bool

Indicates whether the device is currently adjusting its focus setting.

var isSmoothAutoFocusEnabled: Bool

A Boolean value that determines whether smooth autofocus is enabled.

var isSmoothAutoFocusSupported: Bool

A Boolean value that indicates whether the device supports smooth autofocus.

var autoFocusRangeRestriction: AVCaptureDevice.AutoFocusRangeRestriction

A value controlling the allowable range for automatic focusing.

var isAutoFocusRangeRestrictionSupported: Bool

A Boolean value that indicates whether the device supports focus range restrictions.

enum AVCaptureDevice.FocusMode

Constants to specify the focus mode of a capture device.