---
title: "addControl(_:)"
framework: avfoundation
role: symbol
role_heading: Instance Method
path: "avfoundation/avcapturesession/addcontrol(_:)"
---

# addControl(_:)

Adds a control to a capture session.

## Declaration

```swift
func addControl(_ control: AVCaptureControl)
```

## Parameters

- `control`: The capture control to add.

## Mentioned in

Enhancing your app experience with the Camera Control

## Discussion

Discussion A capture session may not be able to add a control due to configuration reasons or limits of the host platform. Before calling this method, determine whether you can successfully add a control by calling the capture session’s canAddControl(_:) method. You may call this method while the session is running. important: For a control to become active, you must set a AVCaptureSessionControlsDelegate on the session.

## See Also

### Configuring capture controls

- [supportsControls](avfoundation/avcapturesession/supportscontrols.md)
- [maxControlsCount](avfoundation/avcapturesession/maxcontrolscount.md)
- [controls](avfoundation/avcapturesession/controls.md)
- [canAddControl(_:)](avfoundation/avcapturesession/canaddcontrol(_:).md)
- [removeControl(_:)](avfoundation/avcapturesession/removecontrol(_:).md)
- [setControlsDelegate(_:queue:)](avfoundation/avcapturesession/setcontrolsdelegate(_:queue:).md)
- [AVCaptureSessionControlsDelegate](avfoundation/avcapturesessioncontrolsdelegate.md)
- [controlsDelegate](avfoundation/avcapturesession/controlsdelegate.md)
- [controlsDelegateCallbackQueue](avfoundation/avcapturesession/controlsdelegatecallbackqueue.md)
