Hinge State

A type encapsulating the state of a single hinge.

Hinge State - Preview Not Available

Platform Compatibility

iOS 27.1+ iPadOS 27.1+

Tags

SwiftUI Code

Docs
@State private var hinge: DeviceHinge? = nil

var body: some View {
    VStack {
        if let hinge {
            Text("Status \(hinge.status)")
            Text("Angle \(hinge.angle.degrees, specifier: "%.0f")°")
        } else {
            ContentUnavailableView(
                "Hinge Unavailable",
                systemImage: "rectangle.split.2x1"
            )
        }
    }
    .onHingeChange { _, newContext in
        hinge = newContext.hinge
    }
}

Found an issue or have a suggestion?

Created: September 26, 2026Updated: September 26, 2026
Connect Wizard

Connect Wizard

Unlock insights App Store Connect doesn’t show you.

Get Started