Skip to content

Releases: material-components/material-components-ios

v85.1.0

25 Jun 12:53
Compare
Choose a tag to compare

85.1.0

In this minor release we have begun development of a new Tab component, as well as additional tests and bug fixes.

New features

Chips now support selection for ripple when in the selected state.

MDCChipView *chipView = [[MDCChipView alloc] init];
chipView.enableRippleBehavior = YES;
chipView.rippleAllowsSelection = YES;

API changes

Chips

MDCChipView

new property: rippleAllowsSelection in MDCChipView

Tabs

MDCTabBarView

new class: MDCTabBarView

Component changes

Changes

AppBar

Banner

Chips

NavigationDrawer

Tabs

schemes/Typography

Multi-component changes

v85.0.1

20 Jun 17:21
Compare
Choose a tag to compare

This patch release fixes a bug that Banner doesn't layout correctly in landscape mode on some devices and a floating point rounding issue in NavigationDrawer.

Changes

Banner

NavigationDrawer

v85.0.0

18 Jun 14:51
Compare
Choose a tag to compare

In this major release we updated sizeThatFits: calculation for MDCBottomNavigationBar to not include safe area, added Ripple support to all our interactable components, and more layout customization for Banner.

Breaking changes

We have changed the sizeThatFits: behavior for BottomNavigation's bar to not include the safe area by default. This is a breaking change as prior we did include the safe area as part of the calculation, but we should not since the view controller (or parent view) should worry about positioning the BottomNavigationBar within the unsafe area (if it desires).

If you still wish to include the safe area in the sizeThatFits calculation:

self.bottomNavigationBar.sizeThatFitsIncludesSafeArea = YES;

New features

Enable the new Ripple behavior in components by setting enableRippleBehavior to YES, and set its color using the rippleColor API:

MDCTabBar *tabBar = [[MDCTabBar alloc] init];
tabBar.enableRippleBehavior = YES;
tabBar.rippleColor = UIColor.blueColor;

MDCBanner supports different layout styles using the MDCBannerViewLayoutStyle enum:

MDCBannerView *bannerView = [[MDCBannerView alloc] init];
bannerView.bannerViewLayoutStyle = MDCBannerViewLayoutStyleSingleRow;

MDCBanner now allows you to show/hide a divider:

MDCBannerView *bannerView = [[MDCBannerView alloc] init];
bannerView.showsDivider = YES;

API changes

ActionSheet

MDCActionSheetController

new property: rippleColor in MDCActionSheetController

new property: enableRippleBehavior in MDCActionSheetController

MDCActionSheetController(ToBeDeprecated)

new category: MDCActionSheetController(ToBeDeprecated)

modified property: inkColor in MDCActionSheetController(ToBeDeprecated)

Type of change: parent.usr
From: c:objc(cs)MDCActionSheetController
To: c:objc(cy)MDCActionSheetController@ToBeDeprecated

Banner

MDCBannerViewLayoutStyle

new enum value: MDCBannerViewLayoutStyleAutomatic in MDCBannerViewLayoutStyle

new enum value: MDCBannerViewLayoutStyleMultiRowAlignedButton in MDCBannerViewLayoutStyle

new enum value: MDCBannerViewLayoutStyleMultiRowStackedButton in MDCBannerViewLayoutStyle

new enum value: MDCBannerViewLayoutStyleSingleRow in MDCBannerViewLayoutStyle

new enum: MDCBannerViewLayoutStyle

new typedef: MDCBannerViewLayoutStyle

MDCBannerView

new property: bannerViewLayoutStyle in MDCBannerView

new property: showsDivider in MDCBannerView

new property: dividerColor in MDCBannerView

BottomNavigation

MDCBottomNavigationBar(ToBeDeprecated)

new category: MDCBottomNavigationBar(ToBeDeprecated)

modified property: sizeThatFitsIncludesSafeArea in MDCBottomNavigationBar(ToBeDeprecated)

Type of change: parent.usr
From: c:objc(cs)MDCBottomNavigationBar
To: c:objc(cy)MDCBottomNavigationBar@ToBeDeprecated

MDCBottomNavigationBar

new property: enableRippleBehavior in MDCBottomNavigationBar

ButtonBar

MDCButtonBar

new property: enableRippleBehavior in MDCButtonBar

new property: rippleColor in MDCButtonBar

MDCButtonBar(ToBeDeprecated)

new category: MDCButtonBar(ToBeDeprecated)

modified property: inkColor in MDCButtonBar(ToBeDeprecated)

Type of change: parent.usr
From: c:objc(cs)MDCButtonBar
To: c:objc(cy)MDCButtonBar@ToBeDeprecated

Dialogs

MDCAlertControllerView

new property: enableRippleBehavior in MDCAlertControllerView

MDCAlertController

new property: enableRippleBehavior in MDCAlertController

List

MDCBaseCell

new property: rippleColor in MDCBaseCell

new property: enableRippleBehavior in MDCBaseCell

MDCBaseCell(ToBeDeprecated)

new category: MDCBaseCell(ToBeDeprecated)

modified property: inkColor in MDCBaseCell(ToBeDeprecated)

Type of change: parent.usr
From: c:objc(cs)MDCBaseCell
To: c:objc(cy)MDCBaseCell@ToBeDeprecated

NavigationBar

MDCNavigationBar

new property: enableRippleBehavior in MDCNavigationBar

new property: rippleColor in MDCNavigationBar

MDCNavigationBar(ToBeDeprecated)

new category: MDCNavigationBar(ToBeDeprecated)

modified property: inkColor in MDCNavigationBar(ToBeDeprecated)

Type of change: parent.usr
From: c:objc(cs)MDCNavigationBar
To: c:objc(cy)MDCNavigationBar@ToBeDeprecated

Slider

MDCSlider(ToBeDeprecated)

new category: MDCSlider(ToBeDeprecated)

modified property: inkColor in MDCSlider(ToBeDeprecated)

Type of change: parent.usr
From: c:objc(cs)MDCSlider
To: c:objc(cy)MDCSlider@ToBeDeprecated

MDCSlider

new property: enableRippleBehavior in MDCSlider

new property: rippleColor in MDCSlider

Snackbar

MDCSnackbarMessage

new property: enableRippleBehavior in MDCSnackbarMessage

Tabs

MDCTabBar

new property: enableRippleBehavior in MDCTabBar

new property: rippleColor in MDCTabBar

MDCTabBar(ToBeDeprecated)

new category: MDCTabBar(ToBeDeprecated)

modified property: inkColor in MDCTabBar(ToBeDeprecated)

Type of change: parent.usr
From: c:objc(cs)MDCTabBar
To: c:objc(cy)MDCTabBar@ToBeDeprecated

Component changes

Changes

ActionSheet

AppBar

Banner

BottomNavigation

BottomSheet

ButtonBar

Dialogs

List

NavigationBar

Slider

Snackbar

Tabs

  • [Adds the...
Read more

v84.6.0

11 Jun 12:43
Compare
Choose a tag to compare

In this minor release we added new features to ActionSheet and NavigationDrawer, as well as additional tests and bug fixes.

New features

ActionSheet now allows clients to align all titles regardless of if an image is present or not.

let actionSheet = MDCActionSheetController()
let actionOne = MDCActionSheetAction(title: "Email",
                                     image: nil) { (_) in
                                       print("Email action") }
let actionTwo = MDCActionSheetAction(title: "Cancel",
                                     image: UIImage(named: "CancelImage")) { (_) in
                                       print("Cancel action") }
actionSheet.addAction(actionOne)
actionSheet.addAction(actionTwo)
actionSheet.alwaysAlignTitleLeadingEdges = true

NavigationDrawer now allows clients to automatically include the safeAreaInsets in the content height calculation.
By enabling this flag the MDCBottomDrawerViewController will add the safeAreaInsets.bottom to the preferredContentSize.height
of the contentViewController.

let navigationDrawer = MDCBottomDrawerViewController()
navigationDrawer.shouldIncludeSafeAreaInContentHeight = true

API changes

ActionSheet

new property: alwaysAlignTitleLeadingEdges in MDCActionSheetController

NavigationDrawer

new property: shouldIncludeSafeAreaInContentHeight in MDCBottomDrawerViewController
new property: shouldIncludeSafeAreaInContentHeight in MDCBottomDrawerPresentationController

Component changes

Changes

ActionSheet

Buttons

List

MaskedTransition

NavigationDrawer

Ripple

Tabs

schemes/Typography

Multi-component changes

v84.5.0

05 Jun 12:00
Compare
Choose a tag to compare

84.5.0

In this minor release we have expanded our support for NavigationBar as well as additional tests and bug fixes.

New features

NavigationBar now allows clients to present overlay views that point to views in an MDCNavigationBar:

let leadingRect = navigationBar.rect(forLeading: leadingItem, in: view)
let trailingRect = navigationBar.rect(forTrailing: trailingItem, in: view)
// Present an overlay pointing at `leadingRect` or `trailingRect`

API changes

NavigationBar

MDCNavigationBar

new method: -rectForLeadingBarButtonItem:inCoordinateSpace in MDCNavigationBar
new method: -rectForTrailingBarButtonItem:inCoordinateSpace in MDCNavigationBar

Component changes

Changes

AppBar

Buttons

Dialogs

List

NavigationBar

Tabs

TextFields

Typography

Multi-component changes

v84.4.0

28 May 16:07
Compare
Choose a tag to compare

In this minor release we have expanded our support for custom Dynamic Type scaling curves in Buttons, Chips, and List, as well as additional tests and bug fixes.

New deprecations

mdc_legacyFontScaling in MDCButton and MDCChipView has been deprecated.
Please use adjustsFontForContentSizeCategoryWhenScaledFontIsUnavailable instead.

New features

Buttons, Chips, and List, have expanded their support for Dynamic Type to allow custom scaling curves to be associated with fonts:

MDCButton *button = [[MDCButton alloc] init];
UIFont *customFont = [UIFont fontWithName:@"CustomFontName" size:18.0];
MDCFontScaler *fontScaler = [MDCFontScaler scalerForMaterialTextStyle:MDCTextStyleBody1];
UIFont *customScalableFont = [fontScaler scaledFontWithFont:customFont];
[button setTitleFont:customScalingFont forState:UIControlStateNormal];

Buttons, Chips, Dialogs, and List, now have a new property
adjustsFontForContentSizeCategoryWhenScaledFontIsUnavailable that affects the fallback behavior for when a scaled font is not provided.
If set to YES the font size will adjust even if a scaled font has not been provided for a given UIFont property on this component. If set to NO, the font size will only be adjusted if a scaled font has been provided.

ButtonBar now allows clients to present overlay views that point to views in an MDCButtonBar:

let rect = buttonBar.rect(for: item, in: view)
// Present an overlay pointing at `rect`

As part of the typography component, we added a new method to UIFont mdc_scaledFontForTraitEnvironment: that returns a font with the same family, weight and traits, but whose point size is based on the given trait environment's preferred content size category.

API changes

ButtonBar

MDCButtonBar

new method: -rectForItem:item:inCoordinateSpace in MDCButtonBar

Buttons

MDCButton

new property: adjustsFontForContentSizeCategoryWhenScaledFontIsUnavailable in MDCButton

deprecated property: mdc_legacyFontScaling in MDCButton

Chips

MDCChipView

new property: adjustsFontForContentSizeCategoryWhenScaledFontIsUnavailable in MDCChipView

deprecated property: mdc_legacyFontScaling in MDCChipView

Dialogs

MDCAlertController

new property: adjustsFontForContentSizeCategoryWhenScaledFontIsUnavailable in MDCAlertController

List

MDCSelfSizingStereoCell

new property: adjustsFontForContentSizeCategoryWhenScaledFontIsUnavailable in MDCSelfSizingStereoCell

Typography

UIFont+MaterialScalable

new method: mdc_scaledFontForTraitEnvironment:traitEnvironment in UIFont+MaterialScalable

schemes/Typography

MDCTypographyScheme

new property: useCurrentContentSizeCategoryWhenApplied in MDCTypographyScheming

new property: useCurrentContentSizeCategoryWhenApplied in MDCTypographyScheme

Component changes

Changes

ButtonBar

Buttons

Chips

Dialogs

List

NavigationDrawer

Tabs

Typography

schemes/Typography

v84.3.0

23 May 21:03
Compare
Choose a tag to compare

This minor release adds new theming extensions for Lists and minor bug fixes and documentation updates to multiple components.

New features

Theming extensions are now available for Lists:

let cell = MDCSelfSizingStereoCell()
let scheme = MDCContainerScheme()

cell.applyTheme(withScheme: scheme)

API changes

Chips

MDCChipView

modified class: MDCChipView

new property: mdc_legacyFontScaling in MDCChipView

List+Theming

New extension.

Changes

Buttons

Chips

FlexibleHeader

List

NavigationDrawer

ProgressView

Multi-component changes

v84.2.1

22 May 23:42
Compare
Choose a tag to compare

This patch release fixes a bug where dialogs were not indicating that their content was scrollable.

Changes

Dialogs

v84.2.0

17 May 13:37
Compare
Choose a tag to compare

84.2.0

This minor release adds support for a custom unbounded Ripple radius value. It also includes several
bug fixes and documentation updates to multiple components.

New features

MDCRippleView now supports a custom ripple radius for the .unbounded ripple style. This allows
clients to customize how far outside (or within) a view the ripple effect will extend.

MDCRippleView *rippleView = [[MDCRippleView alloc] init];
rippleView.rippleStyle = MDCRippleStyleUnbounded;
rippleView.maximumRadius = 10;

API changes

Ripple

MDCRippleView

new property: maximumRadius in MDCRippleView

ShadowElevations

MDCShadowElevationNavDrawer

modified constant: MDCShadowElevationNavDrawer

Type of change: Declaration
From: static const MDCShadowElevation MDCShadowElevationNavDrawer = (CGFloat)16.
To: static const MDCShadowElevation MDCShadowElevationNavDrawer = (CGFloat)4.

Component changes

Changes

ActionSheet

BottomNavigation

Ink

NavigationDrawer

Ripple

TextFields

Snapshot (private)

Multi-component changes

v84.1.1

07 May 15:52
Compare
Choose a tag to compare

This patch release fixes ActionSheet to lay out its content correctly when there is a safe area present, for iOS 11 and newer.

Changes

ActionSheet