Skip to content

v93.5.0

Compare
Choose a tag to compare
@romoore romoore released this 07 Nov 16:43
· 2052 commits to stable since this release

This minor release introduces new APIs for Slider. The track height and the
visibility of track tick marks can be customized.

New features

MDCSlider allows customization of the track height.

Objective-C

MDCSlider *slider = [[MDCSlider alloc] init];
slider.trackHeight = 4;

Swift

let slider = MDCSlider()
slider.trackHeight = 4

MDCSlider also allows controlling the display of the track tick marks for
continuous and discrete sliders. Setting this property disables the automatic
conversion of a slider to "discrete" when setting numberOfDiscreteValues.

Objective-C

MDCSlider *slider = [[MDCSlider alloc] init];
// Track tick marks are always shown. Remains a continuous slider.
slider.trackTickVisibility = MDCSliderTrackTickVisibilityAlways;
slider.minimumValue = 0;
slider.maximumValue = 100;
// Show tick marks at 0, 10, 20, ..., 100
slider.numberOfDiscreteValues = 11;

Swift

let slider = MDCSlider()
// Track tick marks are always shown. Remains a continuous slider.
slider.trackTickVisibility = .always
slider.minimumValue = 0;
slider.maximumValue = 100;
// Show tick marks at 0, 10, 20, ..., 100
slider.numberOfDiscreteValues = 11;

Component changes

ThumbTrack

Multi-component changes