<!--
{
  "documentType" : "article",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/capture-device-focus",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Focus"
}
-->

# Focus

Configure the automatic focus behavior of a camera, or manually set its lens position.

## Topics

### Configuring automatic focus

[`-  isFocusModeSupported:`](/documentation/AVFoundation/AVCaptureDevice/isFocusModeSupported(_:))

Returns a Boolean value that indicates whether the device supports the specified focus mode.

[`focusMode`](/documentation/AVFoundation/AVCaptureDevice/focusMode-swift.property)

The capture device’s focus mode.

[`FocusMode`](/documentation/AVFoundation/AVCaptureDevice/FocusMode-swift.enum)

Constants to specify the focus mode of a capture device.

[`smoothAutoFocusSupported`](/documentation/AVFoundation/AVCaptureDevice/isSmoothAutoFocusSupported)

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

[`smoothAutoFocusEnabled`](/documentation/AVFoundation/AVCaptureDevice/isSmoothAutoFocusEnabled)

A Boolean value that indicates whether smooth autofocus is in an enabled state on the device.

[`faceDrivenAutoFocusEnabled`](/documentation/AVFoundation/AVCaptureDevice/isFaceDrivenAutoFocusEnabled)

A Boolean value that indicates whether the device has face-driven autofocus enabled.

[`automaticallyAdjustsFaceDrivenAutoFocusEnabled`](/documentation/AVFoundation/AVCaptureDevice/automaticallyAdjustsFaceDrivenAutoFocusEnabled)

A Boolean value that indicates whether the device automatically adjusts face-driven autofocus.

[`autoFocusRangeRestrictionSupported`](/documentation/AVFoundation/AVCaptureDevice/isAutoFocusRangeRestrictionSupported)

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

[`autoFocusRangeRestriction`](/documentation/AVFoundation/AVCaptureDevice/autoFocusRangeRestriction-swift.property)

A value that controls the allowable range for automatic focusing.

[`AutoFocusRangeRestriction`](/documentation/AVFoundation/AVCaptureDevice/AutoFocusRangeRestriction-swift.enum)

Constants to specify the autofocus range of a capture device.

### Setting a focus point of interest

[`focusPointOfInterestSupported`](/documentation/AVFoundation/AVCaptureDevice/isFocusPointOfInterestSupported)

A Boolean value that indicates whether the device supports a point of interest for focus.

[`focusPointOfInterest`](/documentation/AVFoundation/AVCaptureDevice/focusPointOfInterest)

The point of interest for focusing.

### Setting a focus rectangle of interest

[`focusRectOfInterestSupported`](/documentation/AVFoundation/AVCaptureDevice/isFocusRectOfInterestSupported)

Whether the receiver supports focus rectangles of interest.

[`focusRectOfInterest`](/documentation/AVFoundation/AVCaptureDevice/focusRectOfInterest)

The device’s current focus rectangle of interest, if it has one.

[`minFocusRectOfInterestSize`](/documentation/AVFoundation/AVCaptureDevice/minFocusRectOfInterestSize)

The minimum size you may use when specifying a rectangle of interest.

[`-  defaultRectForFocusPointOfInterest:`](/documentation/AVFoundation/AVCaptureDevice/defaultRectForFocusPoint(ofInterest:))

The default rectangle of interest used for a given focus point of interest.

### Monitoring focus changes

[`adjustingFocus`](/documentation/AVFoundation/AVCaptureDevice/isAdjustingFocus)

A Boolean value that indicates whether the device is currently adjusting its focus setting.

### Setting focus manually

[`lockingFocusWithCustomLensPositionSupported`](/documentation/AVFoundation/AVCaptureDevice/isLockingFocusWithCustomLensPositionSupported)

A Boolean value that indicates whether the device supports locking focus to a specific lens position.

[`lensPosition`](/documentation/AVFoundation/AVCaptureDevice/lensPosition)

The current focus position of the lens.

[`AVCaptureLensPositionCurrent`](/documentation/AVFoundation/AVCaptureDevice/currentLensPosition)

A constant that represents the current lens position.

[`-  setFocusModeLockedWithLensPosition:completionHandler:`](/documentation/AVFoundation/AVCaptureDevice/setFocusModeLocked(lensPosition:completionHandler:))

Locks the lens position at the specified value, and sets the focus mode to a locked state.

### Inspecting the focus distance

[`minimumFocusDistance`](/documentation/AVFoundation/AVCaptureDevice/minimumFocusDistance)

The capture device’s minimum focus distance in millimeters.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)