Instance Property


The slider’s current value.


var value: Float { get set }


Use this property to get and set the slider’s current value. To render an animated transition from the current value to the new value, use the setValue(_:animated:) method instead.

If you try to set a value that is below the minimum or above the maximum, the minimum or maximum value is set instead. The default value of this property is 0.0.

See Also

Accessing the Slider’s Value

func setValue(Float, animated: Bool)

Sets the slider’s current value, allowing you to animate the change visually.