---
title: "setFramingMode(_:)"
framework: dockkit
role: symbol
role_heading: Instance Method
path: "dockkit/dockaccessory/setframingmode(_:)"
---

# setFramingMode(_:)

Customize the dock accessory’s tracking behavior.

## Declaration

```swift
final func setFramingMode(_ mode: DockAccessory.FramingMode) async throws
```

## Parameters

- `mode`: The framing mode to set tracking to. See doc://com.apple.DockKit/documentation/DockKit/DockAccessory/FramingMode-swift.enum for more information.

## Discussion

Discussion Use this method to change where DockKit places a subject within the frame. For example, a face may be on the left or right side within the video. If you disable system tracking, this setting applies locally to the current dock accessory only. Otherwise, this setting applies to any active camera stream. Set the frame mode to the desired value before performing your own custom tracking. The default is DockAccessory.FramingMode.automatic. See DockAccessory.FramingMode for other values you can use to override. note: DockKitError.notConnected if device isn’t connected, or DockKitError.notSupported in macOS.

## See Also

### Setting framing mode

- [framingMode](dockkit/dockaccessory/framingmode-swift.property.md)
- [DockAccessory.FramingMode](dockkit/dockaccessory/framingmode-swift.enum.md)
