Skip to content

Releases: material-components/material-components-ios

v113.1.0

18 Aug 14:13
Compare
Choose a tag to compare

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

BottomNavigation

ButtonBar

Chips

NavigationDrawer

ScalableFontDescriptor

Snackbar

Tabs

Multi-component changes

v113.0.0

12 Aug 13:52
Compare
Choose a tag to compare

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

Slider

Snackbar

Tabs

TextControls

private/ThumbTrack

Multi-component changes

v112.1.0

06 Aug 18:41
Compare
Choose a tag to compare

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

BottomAppBar

BottomNavigation

NavigationDrawer

Shapes

TextControls

Multi-component changes

v112.0.1

03 Aug 19:13
Compare
Choose a tag to compare

This patch release fixes the broken podspec configuration.

v112.0.0

31 Jul 13:50
Compare
Choose a tag to compare

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

BottomNavigation

ButtonBar

Buttons

Chips

Dialogs

FeatureHighlight

HeaderStackView

ProgressView

Shapes

Slider

Snackbar

Tabs

TextControls

private/Snapshot

private/TextControlsPrivate

private/ThumbTrack

schemes/Shape

Multi-component changes

v111.0.0

21 Jul 14:04
Compare
Choose a tag to compare

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

Banner

BottomAppBar

ButtonBar

Chips

Dialogs

NavigationDrawer

ProgressView

Tabs

v110.3.0

14 Jul 13:35
Compare
Choose a tag to compare

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

Chips

Dialogs

LibraryInfo

NavigationDrawer

TextControls

private/Math

Multi-component changes

v110.2.0

06 Jul 18:40
Compare
Choose a tag to compare

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

Chips

Dialogs

FlexibleHeader

NavigationBar

NavigationDrawer

TextControls

private/Math

Multi-component changes

v110.1.0

29 Jun 19:54
Compare
Choose a tag to compare

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

AppBar

BottomNavigation

Buttons

Chips

Dialogs

NavigationDrawer

ProgressView

Snackbar

TextFields

private/ThumbTrack

Multi-component changes

v110.0.0

23 Jun 22:23
Compare
Choose a tag to compare

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

BottomNavigation

Chips

Dialogs

List

NavigationDrawer

ProgressView

Ripple

TextControls

Typography