Contents

init(value:in:label:currentValueLabel:minimumValueLabel:maximumValueLabel:markedValueLabels:)

Creates a gauge representing a value within a range.

Declaration

nonisolated init<V>(value: V, in bounds: ClosedRange<V> = 0...1, @ContentBuilder label: () -> Label, @ContentBuilder currentValueLabel: () -> CurrentValueLabel, @ContentBuilder minimumValueLabel: () -> BoundsLabel, @ContentBuilder maximumValueLabel: () -> BoundsLabel, @ContentBuilder markedValueLabels: () -> MarkedValueLabels) where V : BinaryFloatingPoint

Parameters

  • value:

    The value to show in the gauge.

  • bounds:

    The range of the valid values. Defaults to 0...1.

  • label:

    A view that describes the purpose of the gauge.

  • currentValueLabel:

    A view that describes the current value of the gauge.

  • minimumValueLabel:

    A view that describes the lower bounds of the gauge.

  • maximumValueLabel:

    A view that describes the upper bounds of the gauge.

  • markedValueLabels:

    A content builder containing tagged views. each of which describes a particular value of the gauge. The method ignores this parameter.

See Also

Creating a gauge