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

# init(handler:)

Creates a capture event interaction with a handler that responds to presses of hardware buttons.

```
init(handler: @escaping (AVCaptureEvent) -> Void)
```

## Parameters

`handler`

An event handler the system calls when a person performs a primary or 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)