Initializer

init(value:total:label:currentValueLabel:)

Creates a progress view for showing determinate progress, with a custom label.

Declaration 宣言

init<V>(value: V?, total: V = 1.0, label: () -> Label, currentValueLabel: () -> CurrentValueLabel) where V : BinaryFloatingPoint
Available when Label conforms to View and CurrentValueLabel conforms to View.

Parameters パラメータ

value

The completed amount of the task to this point, in a range of 0.0 to total, or nil if the progress is indeterminate.

total

The full amount representing the complete scope of the task, meaning the task is complete if value equals total. The default value is 1.0.

label

A view builder that creates a view that describes the task in progress.

currentValueLabel

A view builder that creates a view that describes the level of completed progress of the task.

Discussion 議論

If the value is non-nil, but outside the range of 0.0 through total, the progress view pins the value to those limits, rounding to the nearest possible bound. A value of nil represents indeterminate progress, in which case the progress view ignores total.

See Also 参照

Creating a Determinate Progress View