Contents

accessoryCircularCapacity

A gauge style that displays a closed ring that’s partially filled in to indicate the gauge’s current value.

Declaration

@MainActor @preconcurrency static var accessoryCircularCapacity: AccessoryCircularCapacityGaugeStyle { get }

Discussion

Apply this style to a Gauge or to a view hierarchy that contains gauges using the gaugeStyle(_:) modifier:

Gauge(value: batteryLevel, in: 0...100) {
    Text("Battery Level")
}
.gaugeStyle(.accessoryCircularCapacity)

This style displays the gauge’s currentValueLabel value at the center of the gauge.

See Also

Getting circular gauge styles