---
title: UIHinge
framework: UIKit
role: symbol
role_heading: Class
platforms: [iOS 27.1+, iPadOS 27.1+]
path: uikit/uihinge
---

# UIHinge

An object encapsulating the state of a single hinge.

## Declaration

```swift
@MainActor class UIHinge
```

## Overview

Overview You observe hinge state by adding a UIHingeInteraction to a view and reading it from the update delivered to its handler. override func viewDidLoad() {     super.viewDidLoad()

let interaction = UIHingeInteraction { [weak self] _, update in         guard let self else { return }         // A nil `hinge` indicates the interaction has left a         // hierarchy that provides hinge updates.         guard let hinge = update.hinge else {             handleHingeUnavailable()             return         }

updateAngleDisplay(with: hinge.angle)         updateStatusDisplay(with: hinge.status)     }

view.addInteraction(interaction) } In the example above, the current angle and status of the hinge are displayed as the user interacts with the hinge.

## Topics

### Getting the hinge state

- [angle](uikit/uihinge/angle.md)
- [status](uikit/uihinge/status-swift.property.md)
- [UIHinge.Status](uikit/uihinge/status-swift.enum.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [Sendable](swift/sendable.md)

## See Also

### Device environment

- [UIDevice](uikit/uidevice.md)
- [UIStatusBarManager](uikit/uistatusbarmanager.md)
- [UIHingeInteraction](uikit/uihingeinteraction.md)
