<!--
{
  "availability" : [
    "iOS: 17.2.0 -",
    "iPadOS: 17.2.0 -",
    "macCatalyst: 17.2.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVKit",
  "identifier" : "/documentation/AVKit/AVCaptureEventInteraction/init(primary:secondary:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "AVKit"
    ],
    "preciseIdentifier" : "c:objc(cs)AVCaptureEventInteraction(im)initWithPrimaryEventHandler:secondaryEventHandler:"
  },
  "title" : "init(primary:secondary:)"
}
-->

# init(primary:secondary:)

Creates a capture event interaction with handlers that respond independently to presses of hardware buttons.

```
init(primary primaryHandler: @escaping (AVCaptureEvent) -> Void, secondary secondaryHandler: @escaping (AVCaptureEvent) -> Void)
```

## Parameters

`primaryHandler`

An event handler the system calls when a person performs a primary capture event.

`secondaryHandler`

An event handler the system calls when a person performs a secondary capture event.

---

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)