---
title: "init(device:action:)"
framework: avfoundation
role: symbol
role_heading: Initializer
path: "avfoundation/avcapturesystemexposurebiasslider/init(device:action:)"
---

# init(device:action:)

Creates a slider to control the exposure bias of the specified capture device with an action to respond to exposure bias changes.

## Declaration

```swift
init(device: AVCaptureDevice, action: @escaping @MainActor @Sendable (Float) -> Void)
```

## Parameters

- `device`: The capture device to control.
- `action`: An action the system calls on the main actor to handle changes to the device’s doc://com.apple.avfoundation/documentation/AVFoundation/AVCaptureDevice/exposureTargetBias property.

## Discussion

Discussion The system only calls the specified action when the exposure bias slider changes the device’s videoZoomFactor property value. If you need to react to other sources of changes to the exposure target bias, use key-value observation instead. important: Don’t change the capture device’s exposure target bias when the system calls the action.

## See Also

### Creating an exposure bias slider

- [init(device:)](avfoundation/avcapturesystemexposurebiasslider/init(device:).md)
