Instance Method

setValue:animated:

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

Declaration

- (void)setValue:(float)value animated:(BOOL)animated;

Parameters

value

The new value to assign to the value property

animated

Specify YES to animate the change in value; otherwise, specify NO to update the slider’s appearance immediately. Animations are performed asynchronously and do not block the calling thread.

Discussion

If you specify a value that is beyond the minimum or maximum values, the slider limits the value to the minimum or maximum. For example, if the minimum value is 0.0 and you specify -1.0, the slider sets the value property to 0.0.

See Also

Accessing the Slider’s Value

value

The slider’s current value.