init(decorative:variableValue:bundle:)
Creates an unlabeled, decorative image, with a variable value.
Declaration
init(decorative name: String, variableValue: Double?, bundle: Bundle? = nil)Parameters
- name:
The name of the image resource to lookup.
- variableValue:
An optional value between
0.0and1.0that the rendered image can use to customize its appearance, if specified. If the symbol doesn’t support variable values, this parameter has no effect. - bundle:
The bundle to search for the image resource. If
nil, SwiftUI uses the mainBundle. Defaults tonil.
Discussion
This initializer creates an image using a using a symbol in the specified bundle. The rendered symbol may alter its appearance to represent the value provided in variableValue.
SwiftUI ignores this image for accessibility purposes.