<!--
{
  "availability" : [
    "iOS: 27.1.0 -",
    "iPadOS: 27.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIHingeInteraction/init(updateHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIHingeInteraction(im)initWithUpdateHandler:"
  },
  "title" : "init(updateHandler:)"
}
-->

# init(updateHandler:)

Creates a new hinge interaction with the provided update handler.

```
init(updateHandler: @escaping (UIHingeInteraction, UIHingeInteraction.Update) -> Void)
```

## Parameters

`updateHandler`

Called with the initial hinge state and on each subsequent update for the interaction.

## Discussion

The handler is invoked with the initial hinge state, and again whenever there is an update. An update can occur due to the hinge changing, or when the interaction
moves between hierarchies. The handler is stored and escapes, so take care to avoid retain cycles.

---

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)