Releases: material-components/material-components-ios
v113.1.0
In this minor release we have added a ScalableFontDescriptor library to represent custom scalable fonts from iOS 11 and up, added UILargeContentViewer support to AppBar, NavigationBar, TabBarView, as well as other improvements.
New deprecations
- We have deprecated some MDCSnackbarManager class methods. Please use MDCSnackbarManager.defaultManager and their corresponding instance methods instead.
New features
On iOS 11 and up, using ScalableFontDescriptor enables you to describe a custom font and the corresponding UIFontMetrics that enable the font to scale in response to Dynamic Type settings.
This type enables you to pair font descriptors with specific UIFontMetrics. This is most commonly used for describing the metrics of a collection of custom fonts.
// Create the type scale.
let fontDescriptor = UIFontDescriptor(name: "CustomFont-Light", size: UIFont.labelFontSize)
let scalableFontDescriptor: MDCScalableFontDescriptor
if #available(iOS 11, *) {
scalableFontDescriptor = MDCScalableFontDescriptor(
fontDescriptor: fontDescriptor,
fontMetrics: UIFontMetrics(forTextStyle: .largeTitle)
)
} else {
scalableFontDescriptor = MDCScalableFontDescriptor(fontDescriptor: fontDescriptor)
}
// Use the scalable font descriptor.
if #available(iOS 11, *) {
label.font = scalableFontDescriptor.preferredFont(compatibleWith: label.traitCollection)
label.adjustsFontForContentSizeCategory = true
} else {
label.font = scalableFontDescriptor.baseFont()
}
You can now toggle if you would like that your BottomDrawer will display at fullscreen or not when in mobile landscape by setting the shouldDisplayMobileLandscapeFullscreen
property on MDCBottomDrawerViewController
.
let controller = MDCBottomDrawerViewController()
controller.shouldDisplayMobileLandscapeFullscreen = false
Component changes
BottomAppBar
- Fix bug where FAB shadow would "bounce" when the position changed. (Jeff Verkoeyen)
BottomNavigation
ButtonBar
- Adds Large Content Viewer support to MDCButtonBar, MDCNavigationBar, and MDCAppBar. (Yarden Eitan)
- Fall back to accessibilityLabel for UILargeContentView when there is an image and no title. (Yarden Eitan)
- Removes nullability modifiers from file. (Nobody)
Chips
- Add a snapshot test case for MDCChipView with minimumSize set and centerVisible set to YES. (Wenyu Zhang)
NavigationDrawer
ScalableFontDescriptor
- Add a new ScalableFontDescriptor library. (Jeff Verkoeyen)
Snackbar
- Material Snackbar support for selecting which window to present on. (Nobody)
- Deprecate more class methods on MDCSnackbarManager. (Jeff Verkoeyen)
- Deprecate remaining class methods on MDCSnackbarManager. (Jeff Verkoeyen)
- Internal change (Jeff Verkoeyen)
Tabs
- Adds Large Content Viewer support to MDCTabBarView. (Yarden Eitan)
- Animate text and icon colors when switching tabs. (Jeff Verkoeyen)
Multi-component changes
v113.0.0
In this major release we have dropped support for iOS 9.0, added support to Catalyst for our catalogs, and enlarged the minimum touch target of the thumb view of our Slider component.
Breaking changes
- We have dropped support for iOS 9, our minimum iOS version is now set to 10.0.
- MDCChips visibleAreaInsets property is now set to read only.
New deprecations
- We have deprecated some MDCSnackbarManager class methods. Please use MDCSnackbarManager.defaultManager and their corresponding instance methods instead.
API changes
modified property: visibleAreaInsets
in MDCChipView
to be readonly
.
Component changes
Chips
- Expose visibleAreaInsets as a public readonly API. (Wenyu Zhang)
- Remove visibleAreaInsets from public API. (Wenyu Zhang)
Slider
Snackbar
- Deprecate all unused class methods. (Jeff Verkoeyen)
- Internal change (Jeff Verkoeyen)
Tabs
- Clarify handling of safe area layout in the documentation to make clear all properties that need to be set (Alyssa Weiss)
TextControls
- Add KVO for assistive labels (Andrew Overton)
private/ThumbTrack
- Move primaryColor to the ToBeDeprecated category. (Jeff Verkoeyen)
- Turn centerVisibleArea on on ThumbView to ensure its minimum touch target size. (Wenyu Zhang)
Multi-component changes
- Drop support for iOS 9. (Jeff Verkoeyen)
- Enable Catalyst support for the catalogs. (featherless)
- Replace tabs docs (Andrew Overton)
v112.1.0
This minor change introduces two new features and fixes crashes due to UIPointerInteraction use in
iOS 13 betas.
New features
BottomDrawer's MDCBottomDrawerPresentationControllerDelegate has a new method,
bottomDrawerDidTapScrim:
. This method is invoked when the user taps the background behind the
bottom drawer.
MDCBaseTextFieldDelegate and its sole method, baseTextFieldDidDeleteBackward:
have been added to
TextControls.
API changes
Component changes
Banner
- Add setUp and tearDown to AppBarBannerExample to avoid flaky testing result. (Wenyu Zhang)
- Remove AppBar example snapshot tests because the animation involved causes flakiness. (Wenyu Zhang)
BottomAppBar
- Update links in README (Andrew Overton)
BottomNavigation
NavigationDrawer
Shapes
- Add a snapshot test for small path rendered in a large bounding box with same borderWidth and cornerRadius. (Wenyu Zhang)
- Use the path's boundingBox to determine the scale used when borderWidth is deducted from the path. (Wenyu Zhang)
TextControls
- Add MDCBaseTextFieldDelegate (Nobody)
- Add typical use example (Andrew Overton)
Multi-component changes
- Add checks for existence of UIPointerInteraction class to avoid iOS 13 beta crashes (Bryan Oltman)
- Fix Cocoapods/compilation issues (Andrew Overton)
- Internal change. (Jeff Verkoeyen)
- Remove AppBar example snapshot tests because the animation involved causes flakiness. (Wenyu Zhang)
v112.0.1
v112.0.0
This major releases deletes several deprecated APIs, expands Ripple support, and fixes several bugs.
Breaking changes
Buttons' MDCTitleColorAccessibilityMutator
and FeatureHighlight's
MDCFeatureHighlightAccessibilityMutator
have been deleted. There are no official replacements for
these APIs.
MDCHeaderStackViewColorThemer
has been deleted. There is no replacement for this API; use the
AppBar Theming APIs instead.
MDCSnackbarFontThemer
and MDCSnackbarTypographyThemer
have been deleted. Use the Snackbar
Theming APIs instead.
New features
Buttons has several new Ripple APIs, including rippleStyle
, rippleColor
, rippleEdgeInsets
,
and rippleMaximumRadius
. These APIs are intended to act as replacements for the similar Ink APIs.
Chips similarly has added a rippleForState
API.
TabBarView now has a Theming extension.
TextControls now expose a preferredContainerHeight
API.
API changes
Component changes
BottomAppBar
- Material io bottom app bar (Andrew Overton)
BottomNavigation
- When large content view is enabled, on long presses it will correctly switch to the last selected item (Alyssa Weiss)
ButtonBar
Buttons
- Add rippleColor and rippleStyle APIs (Cody Weaver)
- Add rippleEdgeInsets API. (Cody Weaver)
- Add rippleMaximumRadius API. (Cody Weaver)
- Fix lint error
UppercaseAttributedString
inMDCButton
(Nobody) - Remove unused TitleColorAccessibilityMutator. (Bryan Oltman)
Chips
- Add rippleForState APIs. (Cody Weaver)
Dialogs
- Improved titleIconView example with animation. (Galia Kaufman)
FeatureHighlight
- Delete deprecated FeatureHighlightAccessibilityMutator. (Bryan Oltman)
HeaderStackView
- Delete deprecated MDCHeaderStackViewColorThemer (Bryan Oltman)
ProgressView
Shapes
- Add unit tests demonstrating a divide by zero error. (Jeff Verkoeyen)
- Fix divide by zero bug. (Jeff Verkoeyen)
- Fixes for the shape shadow layer if the borderWidth is set multiple times and there isn't a prepareShadowPath pass. (Yarden Eitan)
- Update shapeLayer to the correct path to correctly be a mask for content. (Yarden Eitan)
- Updates the shapeGenerator with a line width to inset the line rather than center it. (Yarden Eitan)
Slider
- Add EarlGrey test to expose bug where tapping on slider track opposite anchor point doesn't trigger UIControlEventValueChanged (Bryan Oltman)
- Remove supplemental directory from examples. (Bryan Oltman)
Snackbar
- Delete deprecated MDCSnackbarFontThemer. (Bryan Oltman)
- Delete deprecated MDCSnackbarTypographyThemer. (Bryan Oltman)
- Use different margins for multi-line snackbars (Alyssa Weiss)
Tabs
- Adding theming extension for TabBarView (Alyssa Weiss)
TextControls
- Add debug stuff to text controls examples (Andrew Overton)
- Expose preferredContainerHeight on MDCBaseTextField (Andrew Overton)
- Fix jumpiness in text areas (Andrew Overton)
- Fix secureTextEntry layout pass infinite loop (Andrew Overton)
private/Snapshot
- Internal change. (Wenyu Zhang)
private/TextControlsPrivate
- Make filled positioning reference subclass NSObject (Andrew Overton)
private/ThumbTrack
- Add centerVisibleArea support with snapshot tests. (Wenyu Zhang)
- Add snapshot tests to MDCThumbTrack. (Wenyu Zhang)
- Fix an issue where sliders with non-min/max anchor points do not publish a UIControlEventValueChanged event when a track tap causes the value to cross the anchor point. (Bryan Oltman)
- Internal Change (Alyssa Weiss)
- Use shapeGenerator to render the backing layer. (Wenyu Zhang)
schemes/Shape
- Add test demonstrating issue with calling borderWidth multiple times with same value. (Yarden Eitan)
Multi-component changes
- Allow setting underline thickness regardless of state (Andrew Overton)
- Prepare to expose preferredContainerHeight on text controls (Andrew Overton)
- Replace material.io API doc links with links to the relevant header f… (Andrew Overton)
v111.0.0
111.0.0
In this Major release we removed some deprecated action sheet themers, made visual improvements to Chips, ProgressView, Banner and Tabs. We also made links clickable in Alert Dialogs
Breaking changes
ActionSheet
We deleted ActionSheet Themers. Use theming extensions.
New features
ButtonBar
Add UIMenu support for MDCButtonBar.
MDCButtonBar *buttonBar = [[MDCButtonBar alloc] init];
UIMenu *primaryMenu = [self exampleMenuWithTitle:@"A primary action menu"];
menuAsPrimaryActionItem = [[UIBarButtonItem alloc] initWithImage:nil menu:primaryMenu];
menuAsPrimaryActionItem.title = @"Menu on tap";
buttonBar.items = @[ menuAsSecondaryActionItem, menuAsPrimaryActionItem, changingActionItem ];
…
- (UIMenu *)exampleMenuWithTitle:(NSString *)title API_AVAILABLE(ios(14.0)) {
UIAction *firstAction = [UIAction actionWithTitle:@"An action"
image:nil
identifier:nil
handler:^(__kindof UIAction *_Nonnull action) {
NSLog(@"First element was tapped.");
}];
UIAction *secondAction = [UIAction actionWithTitle:@"A second action"
image:nil
identifier:nil
handler:^(__kindof UIAction *_Nonnull action) {
NSLog(@"Second element was tapped.");
}];
NSArray<UIAction *> *menuElements = @[ firstAction, secondAction ];
return [UIMenu menuWithTitle:title children:menuElements];
}
Tabs
Add non fixed clustered centered layout style.
tabBar.preferredLayoutStyle =
MDCTabBarViewLayoutStyleNonFixedClusteredCentered;
API changes
TabBarView
new enum: MDCTabBarViewLayoutStyleNonFixedClusteredCentered
Component changes
ActionSheet
- Delete MDCActionSheetColorThemer (Andrew Overton)
- Delete MDCActionSheetThemer and MDCActionSheetScheme (Andrew Overton)
- Delete MDCActionSheetTypographyThemer (Andrew Overton)
- Rename ActionSheet assets (Andrew Overton)
Banner
- Add Banner snapshots for long text with no action style. (Wenyu Zhang)
- Add height constraints to leadingButton and trailingButton on MDCBannerView to handle the case where they are hidden. (Wenyu Zhang)
- Update sizeThatFits calculation to include layout margins in the height calculation and ensure entire leading button can be clicked when trailing button is hidden, by constraining the buttonContainerView to always be at least as tall as the leading button. (Ingerid Fosli)
BottomAppBar
- Internal change (Alyssa Weiss)
ButtonBar
- Add UIMenu support to MDCButtonBar. (Jan Philipp Sachse)
Chips
- Update inter-chip spacing in chip field to align with Material spec (8dp vertical and horizontal inter-chip spacing) (Bryan Oltman)
Dialogs
- Disabling selection in alerts while allowing tappable links (Galia Kaufman)
NavigationDrawer
- Make sure to update color of scrim view background when trait collection changes its user interface style. (Yarden Eitan)
- Update the MDCBottomDrawerViewController MDC themer to use dynamic colors. (Jake Rockland)
ProgressView
Tabs
- Add non fixed clustered centered layout style (Andrew Overton)
v110.3.0
110.3.0
In this release we switched button to use a centerVisibleArea
over the visibleAreaInsets
because it is more versitile. We made improvements to TextControl's layout as well. Bottom drawer can now respond to iPad Slide Over layout changes.
New deprecations
Deprecated method setVisibleAreaInsets:forShape:inMode:
in MDCFloatingButton
. Consider using setCenterVisibleArea:forShape:InMode:
to adjust visible area.
New features
Buttons
Button can now center the visible area so that the button's frame can maintain a touchable size.
CGSize containedButtonSize = [containedButton sizeThatFits:CGSizeZero];
CGFloat containedButtonHeight =
MAX(kMinimumAccessibleButtonSize.height, containedButtonSize.height);
CGFloat containedButtonWidth = MAX(kMinimumAccessibleButtonSize.width, containedButtonSize.width);
containedButton.frame = CGRectMake(0, 0, containedButtonWidth, containedButtonHeight);
containedButton.centerVisibleArea = YES;
NavigationDrawer
Bottom Drawer response to iPad Slide Over layout changes when the adjustLayoutForIPadSlideOver
flag is used.
bottomDrawer.adjustLayoutForIPadSlideOver = YES;
API changes
Buttons
new property: centerVisibleArea
in MDCButton
new method: setCenterVisibleArea:forShape:inMode:
in MDCFloatingButton
NavigationDrawer
new property: adjustLayoutForIPadSlideOver
in MDCBottomDrawerPresentationController
new property: adjustLayoutForIPadSlideOver
in MDCBottomDrawerViewController
Component changes
Buttons
- Add centerVisibleArea support for the FAB and deprecate visibleAreaMode API. (Wenyu Zhang)
- Add centerVisibleArea to MDCButton and mark visibleAreaInsets as to be deprecated. (Wenyu Zhang)
- Add safeguard to avoid overwriting centerVisibleArea with the same value. (Wenyu Zhang)
Chips
- Remove visibleAreaInsets usage in examples with their corresponding snapshot tests. (Wenyu Zhang)
- Use MAX to decide the size of visible area instead of CGSizeZero. (Wenyu Zhang)
Dialogs
LibraryInfo
- Add "k" to string const to fix clang-tidy (Cody Weaver)
NavigationDrawer
- Automated g4 rollback of changelist 319253730. (Nobody)
- Fix bug - New task options don’t have enough padding in iPad Slide Over. (Nobody)
TextControls
- Fix line counting mechanism in text areas (Andrew Overton)
private/Math
- Delete MDCVisibleAreaInsetsForMinimumTappability. (Wenyu Zhang)
Multi-component changes
- Make text fields without floating labels shorter (Andrew Overton)
v110.2.0
In this minor release, we annotated several APIs as to be deprecated in BottomNavigation, Chips, Dialogs, FlexibleHeader, and NavigationBar. We also made improvements and bug fixes to Dialogs, NavigationDrawer, and TextControls.
Component changes
BottomNavigation
- Mark more apis as to-be-deprecated. (Jeff Verkoeyen)
Chips
- Mark more apis as to-be-deprecated. (Jeff Verkoeyen)
Dialogs
- Add title icon examples (Galia Kaufman)
- Adding dynamic type to accessory view examples (Galia Kaufman)
- Fix position of leading/trailing actions in vertical layout (Galia Kaufman)
- Fix title icon resize on orientation change (Galia Kaufman)
- Fixing alignment examples. (Galia Kaufman)
- Mark more apis as to-be-deprecated. (Jeff Verkoeyen)
- Merge typical use examples (Galia Kaufman)
- Moving attributed message example out from accessory view examples (Galia Kaufman)
- Testing trailing actions in reversed vertical order (Galia Kaufman)
- Use API_AVAILABLE instead of
#if defined (__IPHONE_10_0)
etc (Andrew Overton)
FlexibleHeader
NavigationBar
- Mark more apis as to-be-deprecated. (Jeff Verkoeyen)
NavigationDrawer
- Fix bug where MDCBottomDrawerContainerViewController has the size of the screen instead of the window when in iPad Slide Over. (Nobody)
- Update the MDCBottomDrawerViewController MDC themer to use dynamic colors. (Jake Rockland)
TextControls
- Make text areas respond to width changes (Andrew Overton)
- Make text areas shorter when there is no floating label (Andrew Overton)
private/Math
Multi-component changes
- Internal change (Wenyu Zhang)
- Mark more apis as to-be-deprecated. (Jeff Verkoeyen)
v110.1.0
In this minor release, we deprecated visibleAreaInsets
from MDCChipView
and added centerVisibleArea
API. We annotated several APIs as to be deprecated in Buttons. Ripple support is added to CollectionCells and Collections as well.
New deprecations
Chips
visibleAreaInsets
is deprecated.
New features
CollectionCells
Ripple is supported as an opt-in behavior.
Objective-C
MDCCollectionCell *cell= [[MDCCollectionCell alloc] init];
cell.enableRippleBehavior = YES;
Swift
let cell = MDCCollectionCell()
cell.enableRippleBehavior = true
Chips
Chips supports centerVisibleArea
, which is often used to configure invisible part of frame for tappable area.
Objective-C
MDChipView *chip = [[MDCChipView alloc] init];
chip.centerVisibleArea = YES;
Swift
let chip = MDCChipView()
chip.centerVisibleArea = true
API changes
Chips
new property: centerVisibleArea
in MDCChipView
CollectionCells
new property: enableRippleBehavior
in MDCCollectionViewCell
new property: rippleView
in MDCCollectionViewCell
Collections
new property: enableRippleBehavior
in MDCCollectionViewController
new method: - collectionView:rippleTouchController:rippleViewAtIndexPath:
in MDCCollectionViewStylingDelegate
TextFields
new property: useConstraintsForIntrinsicContentSize
in MDCMultilineTextField
Component changes
ActionSheet
- Fix broken links (Andrew Overton)
AppBar
- Remove redundant To Be Deprecated annotation. (Jeff Verkoeyen)
BottomNavigation
Buttons
- Mark more apis as to-be-deprecated. (Jeff Verkoeyen)
Chips
Dialogs
- Modify dialogs docs (Andrew Overton)
NavigationDrawer
- Updated documentation (Josue Lopes)
ProgressView
- Fix RTL support on MDCProgressGradientView. (Wenyu Zhang)
- Reimplement animation on indeterminate mode to meet specification. (Wenyu Zhang)
- Reverse the start point and end point of indeterminate progress stroke to make it aligning with the animation direction. (Wenyu Zhang)
Snackbar
- Use the ToBeDeprecated convention for to-be-deprecated APIs. (Jeff Verkoeyen)
TextFields
- Updates MDCMultilineTextField to better support being embedded in self-sizing cells. (Nobody)
- Updates MDCMultilineTextField's bottom textfield constraint to use the textInsets as the constant. (Nobody)
private/ThumbTrack
Multi-component changes
- Add Ripple as an opt-in for MDCCollections and MDCCollectionCells (Yarden Eitan)
- Delete obsolete markdown files (Andrew Overton)
v110.0.0
In this major release we removed an API from MDCProgressView
and fixed bugs in ActionSheet, Dialogs, ProgressView, Ripple, and TextControls.
Breaking changes
In this release we removed the -setMode:animated:completion:
method that was added in the previous release.
New features
MDCActionSheetController
now announces it has been presented when VoiceOver is enabled.
MDCBottomDrawerViewController
now supports coloring the trackingScrollView
via the theming extension.
MDCRippleView
allows users to query if a ripple was added to a given view.
MDCRippleTouchController
allows users to control the creation and reuse of ripple views.
MDCTextControls
now support custom padding for the leading and trailing views.
API changes
NavigationDrawer
new method: - applyThemeWithScheme:applyToTrackingScrollView:
in MDCBottomDrawerViewController
Ripple
new method: - rippleTouchController:rippleViewAtTouchLocation:
in MDCRippleTouchControllerDelegate
new method: + injectedRippleViewForView:
in MDCRippleView
TextControls
new property: leadingEdgePaddingOverride
in MDCBaseTextArea
new property: trailingEdgePaddingOverride
in MDCBaseTextArea
new property: leadingEdgePaddingOverride
in MDCBaseTextField
new property: trailingEdgePaddingOverride
in MDCBaseTextArea
Component changes
ActionSheet
- Add alert anouncement for voiceover users. (Yarden Eitan)
BottomNavigation
- Re-order TOC in README (Andrew Overton)
Chips
Dialogs
- Add visibleAreaInsets support. (Wenyu Zhang)
List
- Replace list docs (Andrew Overton)
NavigationDrawer
ProgressView
- Change float to CGFloat (Andrew Overton)
- Make indeterminate progress view example showing how transition looks. (Wenyu Zhang)
- Remove setMode:animated:completion API. (Wenyu Zhang)
Ripple
- Add a convenience API for finding the ripple view in the view's subviews. (Yarden Eitan)
- Add delegate method to RippleTouchController existing in InkTouchController. (Yarden Eitan)
- Align ripple starting size with spec guidance. (Yarden Eitan)
- Move the radius calculation into its own method. (Yarden Eitan)
- Update alpha value of Ripple to 0.12 instead of 0.16 (Yarden Eitan)
TextControls
- Add padding customizing properties to MDCBaseTextField and MDCBaseTextArea (Andrew Overton)
- Separate side padding into leading/trailing padding (Andrew Overton)
Typography
- Use MDFTextAccessibility's isLargeForContrastRatios. (Jeff Verkoeyen)