iOS does not implement Material Switches because the iOS native UISwitch should be used instead. This is captured in the cross-platform adaptation guidelines.
Closes#3862
* [ActivityIndicator] Swift first in README
* [AnimationTiming] Swift first in readme.
* [AppBar] Swift first in readme.
* [ButtonBar] Swift first in readme.
* [Buttons] Swift first in readme.
* [CollectionLayoutAttributes] Swift first in readme
* [Collections] Swift first in readme.
* [Dialogs] Swift first in readme.
* [FeatureHighlight] Swift first in readme.
* [FlexibleHeader] Swift first in readme.
* [FontDiskLoader] Swift first in readme.
* [HeaderStackView] Swift first in readme.
* [Ink] Swift first in readme.
* [NavigationBar] Swift first in readme.
* [OverlayWindow] Adding missing site comments. Swift first in readme.
* [PageControl] Swift first in readme.
* [Palettes] Swift first in readme.
* [ProgressView] Swift first in readme.
* [RobotoFontLoader] Swift first in readme.
* [ShadowElevations] Swift first in readme.
* [ShadowLayer] Swift first in readme.
* [Slider] Swift first in readme.
* [Snackbar] Swift first in readme.
* [SpritedAnimationView] Swift first in readme.
* [Switch] Swift first in readme.
* [Typography] Swift first in readme.
* [ShadowLayer] Reducing font size in readme.
* [Switch] Reducing font size in readme.
* [Switch] Added haptic feedback to match UISwitch.
* Added runtime protection.
* Integrated feedback from larche's PR #750.
* Removed haptic tap from the prepareHapticFeedback method.
Fix the issue that the tint color was only respected when the switch
changes from off to on state and update the catalog to set the tint
color after changing the switch state to on.
See issue https://github.com/google/material-components-ios/issues/757.
Summary:
... by removing the MDCThumbTrack dependency. There should be absolutely zero functional changes to the switch other than it being faster to render.
Most of the changes here are based off of MDCThumbTrack, namely the touch handling.
For a 2 second animation of 40 switches:
* Original MDCSwitch renders an average of 33.6 frames
* Fast MDCSwitch renders an average of 98.5 frames
* UISwitch renders an average of 118.7 frames
The time to instantiate each of the sets of 40 switches was similar, although due to the fast MDCSwitch depending on image tinting it is the slowest to instantiate. It would not be unreasonable to cache tinted images if this becomes a performance concern.
Reviewers: randallli, ajsecord, O1 Material components iOS, iangordon
Reviewed By: randallli, ajsecord, O1 Material components iOS, iangordon
Subscribers: randallli, iangordon
Tags: #material_components_ios
Differential Revision: http://codereview.cc/D1524
Summary: Created separate README.md and README.yaml files to remove the odd display of the md in GitHub.
Reviewers: O1 Material components iOS, ajsecord
Reviewed By: O1 Material components iOS, ajsecord
Tags: #material_components_ios
Differential Revision: http://codereview.cc/D1496
Test Plan: Catalog works as expected on iPhoneSim 6 - iOS 9.
Reviewers: O1 Material components iOS, randallli
Reviewed By: O1 Material components iOS, randallli
Tags: #material_components_ios
Differential Revision: http://codereview.cc/D1457
Summary:
Add two properties, `onAccessibilityLabel` and `offAccessibilityLabel` to MDCSwitch to allow users of the switch to specify their own accessibility labels other than the default ones.
Also fixed the existing behavior, which was attempting to get labels out of MaterialSwitch.bundle, which wasn't working the way we were doing it. This meant that no labels were showing up for the Switch whatsoever. I fixed that and kept it as default behavior.
Reviewers: ajsecord, randallli, iangordon, O1 Material components iOS
Reviewed By: ajsecord, randallli, iangordon, O1 Material components iOS
Subscribers: iangordon, ajsecord
Tags: #material_components_ios
Differential Revision: http://codereview.cc/D1354
We can credit any contributor who would like to be credited this way, by adding them on request to the AUTHORS file. The copyright statement changes are required for this to work. Note that this has...
Summary:
We can credit any contributor who would like to be credited this way, by adding them on request to the AUTHORS file. The copyright statement changes are required for this to work. Note that this has no legal change, since the contributors always retained their copyright despite the copyright notice, but it's a nice acknowledgement.
Changed copyright statement to include non-Google authors.
Command run:
find * \( -name '*\.m' -or -name '*\.h' -or -name '*\.swift' \) -and -not \( -path 'scripts/external*' -name Pods \) -print0 | xargs -0 sed -i '' 's/Copyright \(.*\) Google Inc/Copyright \1 the Material Components for iOS authors/'
Added non-source files.
Command run:
grep -Rl 'Copyright .* Google Inc' * --exclude-dir scripts/external --null | xargs -0 sed -i '' 's/Copyright \(.*\) Google Inc/Copyright \1 the Material Components for iOS authors/'
Reviewers: featherless, O1 Material components iOS, randallli
Reviewed By: O1 Material components iOS, randallli
Tags: #material_components_ios
Differential Revision: http://codereview.cc/D1415
Summary: "Material design" is not capitalized except when referring to the actual Material Design team at Google.
Reviewers: O1 Material components iOS, randallli
Reviewed By: O1 Material components iOS, randallli
Subscribers: randallli, featherless
Tags: #material_components_ios
Differential Revision: http://codereview.cc/D1306
Summary:
Before, Sliders and Switches would always return `NO` for the UIControl method `-isTracking`. Now this method passes through to the thumb track, which is then determined by whether or not the user is dragging the thumb.
Reason for this change is to keep parity with UISlider/UISwitch and because at least one internal team relies on this functionality in their existing slider usage.
Reviewers: O1 Material components iOS, randallli
Reviewed By: O1 Material components iOS, randallli
Tags: #material_components_ios
Differential Revision: http://codereview.cc/D1287
Summary:
Makes thumb view hollow when the thumb is on the minimum value. Animates into this state when you move the thumb to the minimum value.
{F5135}
This update includes a sizable refactor of how MDCThumbTracks are updated. I split up the three phases of updating the views into:
1. No-animation block
2. Main animation block
3. Secondary animation block
The first applies changes that you want to see reflected instantly, the second does the main animation of moving the thumb and "on" layer, and the third handles the secondary animation of the thumb animating into this hollow minimum value state. This animation is more generally defined as the animations on the thumb that occur after the thumb reaches its position on the track.
Callers can now specify when they update the thumb whether they want the thumb move to be animated, and separately whether the thumb should animate after arriving at its destination. This way, we can handle the difference between taps on the track, drags of the thumb, and code-based non-animation updates. With taps we want both to be animated, with dragging we want only secondary update to be animated, and if you call `-updateValue:` directly, neither should be animated.
This refactor accounts for those cases, and makes the code a little easier to understand in my opinion.
Closes#555
Relies on D956
Reviewers: ajsecord, O1 Material components iOS, randallli
Reviewed By: ajsecord, O1 Material components iOS, randallli
Subscribers: ajsecord
Tags: #material_components_ios
Differential Revision: http://codereview.cc/D963
- Change API reference link to relative link
- Correct links to other components, all links to other components should end with "/"
- Update icon-links on home, tutorial and components page