<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 18.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVCaptureSession/setControlsDelegate(_:queue:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVCaptureSession(im)setControlsDelegate:queue:"
  },
  "title" : "setControlsDelegate(_:queue:)"
}
-->

# setControlsDelegate(_:queue:)

Sets a delegate object for the system to call when it activates and presents controls.

```
func setControlsDelegate(_ controlsDelegate: (any AVCaptureSessionControlsDelegate)?, queue controlsDelegateCallbackQueue: dispatch_queue_t?)
```

## Parameters

`controlsDelegate`

An object that adopts the controls delegate protocol.

`controlsDelegateCallbackQueue`

A serial dispatch queue on which to call the delegate methods. You must specify a serial queue to ensure callbacks occur in order.

    This argument must not be     `nil`     unless the     `controlsDelegate`     argument is also     `nil;`     otherwise, the system throws an     <doc://com.apple.documentation/documentation/Foundation/NSExceptionName/invalidArgumentException>    .

## Discussion

People interact with capture controls by performing specific gestures to enable their visibility. Specify a delegate to for the system to call when it presents and dismisses controls. The system calls the delegate’s methods on the specified callback queue.

---

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)