Initializer
init(_:value:total:)
Creates a progress view for showing determinate progress that generates its label from a localized string.
Declaration
宣言
Available when Label
conforms to View
and CurrentValueLabel
conforms to View
.
Parameters
パラメータ
titleKey
The key for the progress view’s localized title that describes the task in progress.
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
.
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
.
This initializer creates a Text
view on your behalf, and treats the localized key similar to init(_:tableName:bundle:comment:)
. See Text
for more information about localizing strings.
このイニシャライザは、Text
ビューをあなたに代わって作成します、そしてローカライズされたキーをinit(_:tableName:bundle:comment:)
に似たものと見なします。Text
を文字列のローカライズについてのさらなる情報として見てください。
To initialize a determinate progress view with a string variable, use the corresponding initializer that takes a StringProtocol
instance.
See Also
参照
Creating a Determinate Progress View
init(Progress)
Creates a progress view for visualizing the given progress instance.
Available when Label
conforms to View
and CurrentValueLabel
conforms to View
.
init<V>(value: V?, total: V)
Creates a progress view for showing determinate progress.
Available when Label
conforms to View
and CurrentValueLabel
conforms to View
.
init<S, V>(S, value: V?, total: V)
Creates a progress view for showing determinate progress that generates its label from a string.
Available when Label
conforms to View
and CurrentValueLabel
conforms to View
.