As per Material Design: https://material.io/components/sliders/#discrete-slider a discrete slider can have it thumb stay even when a value label presents itself.
With the current implementation, when a value label on a discrete slider is displayed, the thumb disappears.
Clients can no opt-in to having the thumb continue to display itself when the value label is shown.
Tested by running catalog example on simulator with the property set to YES, as well as with unit test and snapshot test.
Closes#8986
The discrete dots in the ThumbTrack originally assumed that the track would
only ever be 2 points high. Now that customizable heights are allowed, the
dots should scale more slowly.
This is still not perfect, since the original positioning of the ticks resulted in the filled track stopping at non-center positions of each tick. However, it is an incremental improvement and better VX will necessitate Material Design inputs.

Improves #8741
A new API, `trackTickVisibility` is provided to control the visibility of
track tick marks. Specifically allows showing track tick marks for continuous
sliders and for discrete sliders even when the Thumb is not pressed.
Closes#8737
In this PR the main goal is to add Dynamic Type support. As part of this support I am doing the following:
1. Adding a Font API to ThumbTrack and Slider to be able to set the font of the discrete label to a scalable font.
2. Deprecating the old fontSize API (which isn't used internally).
3. Adding adjustsFontForContentSizeCategory APIs to Slider and ThumbTrack.
4. Resizing the ThumbTrack view accordingly based on the font size instead of having it static.
The snapshot tests in place allow me to present the new support for dynamic type and custom fonts.
Closes#8646
This PR adds 2 snapshot tests to verify the behavior for setting preferredFont on the Banner's text elements when adjustsFontForContentSizeCategory is set to YES.
It is important to note that Slider currently doesn't expose any font property nor allows setting adjustsFontForContentSizeCategory on the label of the thumbtrack. These snapshot tests allow us to verify once we provide these APIs to see the changes to the font size.
Opened b/143287831 for tracking.
Closes#8643
* haptics for slider
* updating formatting and style for slider haptics
* updated formatting for slider tests
* updating slider test name
* adding full haptics option for discrete sliders
* updated formatting for full haptics
* updating full haptics
* updating formatting for discrete haptics
* fixing formating
This adds haptics for sliders. The haptics for sliders are opt-out and cause a light vibration when the slider reaches the min or max value. These decisions were made to match apples implementation of haptics for sliders.
Several unit tests were comparing the outcome of arithemtic by using
`XCTAssertEqual`, which requires absolute precision for floating point numbers.
Due to rounding errors, this is neither important nor desirable. Instead,
`XCTAssertEqualWithAccuracy` should be used.
Also corrected the order of the assertion parameters. The test value should
come before the expected value because the failure message has the template,
@"(%@) is not equal to (%@)" and when read it implies that the second value
(sentence object) is the correct value.
Removed some debug messages that managed to creep in there a while back.
Replacing all non-integral, single-precision floating point literals with double-precision values explicitly cast to CGFloat. For example, `0.1f` should become `(CGFloat)0.1`.
Regex used:
```
([0-9]*\.)([0-9]*?)([1-9]+)([0-9]*?)[fF]
```
PiperOrigin-RevId: 220683126
Removes the need to copy-paste stanzas from other files anymore as we'll rely on #4478 to generate the correct stanza for us instead.
This was an automated change generated by running a find-and-replace regular expression:
```
/\*
Copyright ([0-9]+)-present the Material Components for iOS authors\. All Rights Reserved\.
Licensed under the Apache License, Version 2\.0 \(the "License"\);
you may not use this file except in compliance with the License\.
You may obtain a copy of the License at
http://www\.apache\.org/licenses/LICENSE-2\.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.
See the License for the specific language governing permissions and
limitations under the License\.
\*/
```
```
/\*
Copyright ([0-9]+)-present the Material Components for iOS authors\. All Rights Reserved\.
Licensed under the Apache License, Version 2\.0 \(the "License"\);
you may not use this file except in compliance with the License\.
You may obtain a copy of the License at
http://www\.apache\.org/licenses/LICENSE-2\.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.
See the License for the specific language governing permissions and
limitations under the License\.
\*/
```
```
/\*
Copyright ([0-9]+)-present the Material Components for iOS authors\. All Rights Reserved\.
Licensed under the Apache License, Version 2\.0 \(the "License"\);
you may not use this file except in compliance with the License\.
You may obtain a copy of the License at
http://www\.apache\.org/licenses/LICENSE-2\.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.
See the License for the specific language governing permissions and
limitations under the License\.
\*/
```
```
// Copyright $1-present the Material Components for iOS authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
```
When numberOfDiscreteValues is non-zero, the MDCSlider should use these as the step value in accessibilityIncrement and accessibilityDecrement. If the number of discrete values is fewer than 8, then VoiceOver users cannot modify the slider value by swiping up or down.
Instead of a single `color` property that maps back to multiple properties in
MDCThumbTrack, MDCSlider should make each of these properties explicit. This
includes:
* Ink color
* Thumb color
* Track fill color
* Track background color
For `thumbColor`, `trackFillColor`, and `trackBackgroundColor`, the values are adjustable per-state
(e.g., for `.disabled`).
Partially implements #3137
Pivotal link: https://www.pivotaltracker.com/story/show/155525171
* Add Slider appearance properties and enable UIAppearance.
Adds `thumbRadius` and `thumbElevation` as UIAppearance properties.
Makes `color`, `disabledColor`, and `trackBackgroundColor` UIAppearance-compatible.
* Added unit tests for slider.
* Remove infeasible coding unit test for now.
* Line-length formatting.
* Rename and condense color tests, sort by order that they appear in the header.
* Rename tests and mark the thumb section.
* Replace `_thumbTrack.thumbRadius` usage with `self.thumbRadius`.
* Remove NSCoding-related helper, moved to another branch.
* Search-and-replace mixup.
* Line-length fixups.
* [ColorThemes] Use umbrella header instead of MDCColorScheme
* [Application] Use umbrella header instead of class header
* [Button] use umbrella header in private header
* [Typography] use umbrella header in private header
* icons using umbrella header in individual icon class
* [Icons] added header to umbrella header
* [collection] umbrella header instead of class header in test
* [Collections] use umbrella header in private header
* [ActivityIndicator] use umbrella header in private header
* [ButtonBar] use umbrella header in private header
* [Dialog] use umbrella header in private header
* [featurehighlight] use umbrella header in private header
* [snackbar] use umbrella header in private header
* [textFields] use umbrella header in private header
* [thumbtrack] use umbrella header in private header
* [Overlay] use umbrella header in private header
also removed spurious ’s’ at end of MaterialOverlay.h file
* [slider] use umbrella header in private header
* [buttonBar] use umbrella header in private header
* [slider] use umbrella header in test
* [Overlay] fixed overlay reference to use umbrella header
* [Docs] Adds platform configuration for the doc site.
* [Docs] Adds path metadata for documentation site.
This field is used to determine where the file will appear in the
doc site.
* [Docs] Updates Material guideline links to latest URL.
material.google.com -> material.io/guidelines
* [Docs] Introduces a separate component index for the docsite.
* [Docs] Changes the directory used for site generation.
* [Docs] Moves documentation-site-only Markdown into its own directory.
* [Docs] Changes material.io links to use https.
* [Docs] Renames the howto and contributing docsite sections to docs.
* [Docs] Adds a navTitle field to the collection editing/styling pages.
* [Docs] Changes the FAQ heading to be one size bigger.
* [Docs] Changes the tutorial title.
* [Docs] Adds icons to three more components.
* [Docs] Introduces a root component directory called /catalog/.
* [Docs] Adds an icon to the AnimationTiming component.
* [Docs] Adds an icon for the typography component.
* [Docs] Reformats the docsite index.
Summary:
MDC_#767 - Removed bad import and changed public delegate declaration of MDCThumbTrackDelegate to private. Updated unit tests to include private method dec on SliderTests
Merge branch 'MDC_#767' of https://github.com/google/material-components-ios into MDC_#767
MDC_#767 - Updated tests to accommodate for now private delegate method on MDCSlider
Reviewers: O1 Material components iOS, randallli, ajsecord
Reviewed By: O1 Material components iOS, randallli, ajsecord
Subscribers: ajsecord
Tags: #material_components_ios
Differential Revision: http://codereview.cc/D1661
Summary: Same change applied to the max setter.
Reviewers: iangordon, O1 Material components iOS
Reviewed By: iangordon, O1 Material components iOS
Subscribers: ajsecord, iangordon
Tags: #material_components_ios
Differential Revision: http://codereview.cc/D1572