Skip to content

Releases: material-components/material-components-ios

v88.0.0

21 Aug 17:22
Compare
Choose a tag to compare

This major release removes the mdc_legacyFontScaling API from Chips and
Buttons. Ripple's colors when combining .highlighted with the .selected
or .dragged states fall-back to the color for the .normal state rather
than for the .selected or .dragged state. Snackbar allows disabling the
legacy font scaling behavior when no attached Material scaling curves are
found on its fonts. TextFields fully supports Material Elevation, ActionSheet
fixed a bug with dynamic color support, and Banner received a Theming
Extension. Several experimental examples were removed from TextFields.

Breaking changes

Buttons and Chips removed the mdc_legacyFontScaling API. It can be replaced
with adjustsFontForContentSizeCategoryWhenScaledFontIsUnavailable in all
instances without any change in behavior.

New deprecations

Typography's API mdc_adjustsFontForContentSizeCategory is now deprecated and
will be replaced with useCurrentContentSizeCategoryWhenApplied. It will be
removed in a future release.

New features

Ripple State Management

Unless a color is explicitly set for the combination state,
MDCStatefulRippleView now falls-back to the .normal color when either the
.selected or .dragged states are combined with the .highlighted state.
This more closely matches the behavior of UIControl subclasses.

Snackbar Dynamic Type

MDCSnackbarManager and MDCSnackbarMessageView both allow disabling of the
fall-back Material Typography behavior for Dynamic Type support. When the
adjustsFontForContentSizeCategoryWhenScaledFontIsUnavailable property is
YES and no Material scaling curves are found attached to the fonts, then no
automatic Dynamic Type scaling will take place for the manager's or view's
fonts. This effectively disables the pre-2019 behavior for Dynamic Type.

TextFields Support Material Elevation

MDCMultilineTextField now supports Material Elevation. Clients can assign a
value for mdc_overrideBaseElevation or an elevationDidChangeBlock to
ensure that both the Text Field and any subviews can react to elevation
changes.

Banner Theming

MDCBannerView now supports a Theming Extension. Please note that Banner is
still in Beta and not published to CocoaPods.

MDCBannerView *banner = [[MDCBannerView alloc] init];
id<MDCContainerScheming> containerScheme = [[MDCContainerScheme alloc] init];
[banner applyThemeWithScheme:containerScheme];

API changes

Banner+Theming

New extension.

Buttons

MDCButton

removed property: mdc_legacyFontScaling in MDCButton

Snackbar

MDCSnackbarManager

new property: adjustsFontForContentSizeCategoryWhenScaledFontIsUnavailable in MDCSnackbarManager

MDCSnackbarMessageView()

new category: MDCSnackbarMessageView()

removed category: MDCSnackbarMessageView()

modified property: snackbarMessageViewTextColor in MDCSnackbarMessageView()

Type of change: parent.usr
From: c:objc(ext)[email protected]@4029
To: c:objc(ext)[email protected]@4574

MDCSnackbarMessageView

new property: adjustsFontForContentSizeCategoryWhenScaledFontIsUnavailable in MDCSnackbarMessageView

TextFields

MDCMultilineTextField

modified class: MDCMultilineTextField

Type of change: Declaration
From: @interface MDCMultilineTextField : UIView <MDCTextInput, MDCMultilineTextInput>
To: @interface MDCMultilineTextField : UIView

modified class: MDCMultilineTextField

Type of change: Swift declaration
From: class MDCMultilineTextField : UIView, MDCTextInput, MDCMultilineTextInput
To: class MDCMultilineTextField : UIView

TypographyScheme

MDCTypographyScheming

modified property: mdc_adjustsFontForContentSizeCategory in MDCTypographyScheming

Type of change: Deprecation
From: 0
To: 1

modified property: mdc_adjustsFontForContentSizeCategory in MDCTypographyScheming

Type of change: Deprecation message
From: ``
To: Use useCurrentContentSizeCategoryWhenApplied instead.

Component changes

Changes

ActionSheet

Banner

Buttons

Chips

Elevation

Ink

List

Ripple

Shapes

Slider

Snackbar

TextFields

private/Color

schemes/Typography

Read more

v87.1.1

19 Aug 14:34
Compare
Choose a tag to compare

This patch release corrects issues with Git-LFS on the stable branch.

Multi-component changes

v87.1.0

17 Aug 01:36
Compare
Choose a tag to compare

This minor release enhances support for Material Elevation in Text Fields and
Snackbar, brings new conveniences for resolving dynamic colors, and fixes a
dynamic color bug in MDCShapedShadowLayer.

New features

Text Fields

MDCTextField now supports Material Elevation. Clients can assign a value for
mdc_overrideBaseElevation or an elevationDidChangeBlock to ensure that
both the Text Field and any subviews can react to elevation changes.

Snackbar

MDCSnackbarManager now supports assigning a
traitCollectionDidChangeBlockForMessageView and an
mdc_elevationDidChangeBlockForMessageView. These blocks make it easier to
respond to changes in either the elevation or trait collections of the
MDCSnackbarMessageView.

Material Elevation

Material Elevation has a new UIColor category method to make it easier to
optimize checking for dynamic color changes.

Previously

UIColor *resolvedColor = originalColor;
#if defined(__IPHONE_13_0) && (__IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_13_0)
  if (@available(iOS 13.0, *)) {
    if ([traitCollection
            hasDifferentColorAppearanceComparedToTraitCollection:previousTraitCollection]) {
      resolvedColor = [self mdc_resolvedColorWithTraitCollection:traitCollection elevation:elevation];
    }
  }
#endif

This Release

UIColor *resolvedColor =
        [dynamicColor mdc_resolvedColorWithTraitCollection:currentTraitCollection
                                   previousTraitCollection:previousTraitCollection
                                                 elevation:elevation];

API changes

Elevation

UIColor(MaterialElevation)

new method: -mdc_resolvedColorWithTraitCollection:previousTraitCollection:elevation: in UIColor(MaterialElevation)

Snackbar

MDCSnackbarManager

new property: mdc_elevationDidChangeBlockForMessageView in MDCSnackbarManager

new property: traitCollectionDidChangeBlockForMessageView in MDCSnackbarManager

TextFields

MDCTextField

modified class: MDCTextField

Type of change: Swift declaration
From: class MDCTextField : UITextField, MDCTextInput, MDCLeadingViewTextInput
To: class MDCTextField : UITextField

modified class: MDCTextField

Type of change: Declaration
From: @interface MDCTextField : UITextField <MDCTextInput, MDCLeadingViewTextInput>
To: @interface MDCTextField : UITextField

Changes

Elevation

Shapes

Snackbar

TextFields

private/Color

v87.0.2

16 Aug 13:51
Compare
Choose a tag to compare

87.0.2

This patch release fixes a bug where Git-LFS was required on the stable
branch.

Component changes

Multi-component changes

v87.0.0

13 Aug 14:53
Compare
Choose a tag to compare

This major release improves the traitCollectionDidChangeBlock for
MDCButton.

Breaking changes

MDCButton.traitCollectionDidChangeBlock now requires an MDCButton *
instance as its first parameter. This is to allow passing the button itself
into the block and eliminate the need for retaining the button in its own
block.

Previous Releases

button.traitCollectionDidChangeBlock =
    ^(UITraitCollection *_Nullable previousTraitCollection) {
      // Code
    };

In This Release

button.traitCollectionDidChangeBlock =
    ^(MDCButton *_Nonnull buttonInBlock, UITraitCollection *_Nullable previousTraitCollection) {
      // Code
    };

API changes

Buttons

MDCButton

modified property: traitCollectionDidChangeBlock in MDCButton

Type of change: Swift declaration
From: var traitCollectionDidChangeBlock: ((UITraitCollection?) -> Void)? { get set }
To: var traitCollectionDidChangeBlock: ((MDCButton, UITraitCollection?) -> Void)? { get set }

modified property: traitCollectionDidChangeBlock in MDCButton

Type of change: Declaration
From: @property (readwrite, copy, nonatomic, nullable) void (^) (UITraitCollection *_Nullable) traitCollectionDidChangeBlock;
To: @property (readwrite, copy, nonatomic, nullable) void (^) (MDCButton *_Nonnull, UITraitCollection *_Nullable) traitCollectionDidChangeBlock;

Changes

ActionSheet

ButtonBar

Buttons

FlexibleHeader

NavigationBar

TextFields

v86.1.0

12 Aug 19:48
Compare
Choose a tag to compare

This minor release introduces new theming APIs for MDCActionSheetAction and
bug fixes. It also includes improvements to the Contained Input Fields and
Bottom Navigation Bar Controller beta component extensions.

New features

You can now set title and icon tint colors on individual Action Sheet actions.

MDCActionSheetAction *action = [MDCActionSheetAction actionWithTitle:@"An action"
                                                               image:nil
                                                             handler:nil];
action.titleColor = UIColor.darkTextColor;
action.tintColor = UIColor.darkTextColor;

API changes

ActionSheet

MDCActionSheetAction

new property: tintColor in MDCActionSheetAction

new property: titleColor in MDCActionSheetAction

TextFields+ContainedInputView

MDCBaseTextField

new property: trailingView in MDCBaseTextField

new property: leadingViewMode in MDCBaseTextField

new property: leadingView in MDCBaseTextField

new property: trailingViewMode in MDCBaseTextField

Changes

ActionSheet

ActivityIndicator

AppBar

Banner

BottomNavigation

Buttons

Dialogs

LibraryInfo

Palettes

TextFields

Multi-component changes


v86.0.0

06 Aug 15:37
Compare
Choose a tag to compare

In this major release we have provided improvements to our Elevation code for Dark Mode as well as internal clean up.

Breaking changes

Our MDCElevatable protocol now conforms to NSObject so it can leverage the isKindOfClass: and conformsToProtocol: APIs.

API changes

Elevation

MDCElevatable

modified protocol: MDCElevatable

Type of change: Declaration
From: @protocol MDCElevatable
To: @protocol MDCElevatable <NSObject>

modified protocol: MDCElevatable

Type of change: Swift declaration
From: protocol MDCElevatable
To: protocol MDCElevatable : NSObjectProtocol

Component changes

Changes

ActionSheet

ActivityIndicator

AnimationTiming

Banner

BottomAppBar

BottomNavigation

BottomSheet

ButtonBar

Buttons

Cards

Chips

CollectionCells

CollectionLayoutAttributes

Collections

Elevation

FeatureHighlight

FlexibleHeader

HeaderStackView

Ink

LibraryInfo

List

MaskedTransition

NavigationBar

NavigationDrawer

OverlayWindow

PageControl

Palettes

ProgressView

Ripple

ShadowElevations

ShadowLayer

ShapeLibrary

Shapes

Slider

Snackbar

Tabs

TextFields

Themes

Typography

private/Application

private/Color

private/Icons

private/KeyboardWatcher

private/Math

private/Overlay

private/ThumbTrack

private/UIMetrics

  • [Use Starlark macros in t...
Read more

v85.12.0

01 Aug 15:44
Compare
Choose a tag to compare

This minor release introduces Material Elevation support for ActionSheet and Banner (Beta). It also includes performance improvements for Ink and Ripple.

New features

Support for Material Elevation expanded to two more components. APIs to support
overriding the computed value for mdc_baseElevation and to respond to
elevation changes are available. Assigning an elevationDidChangeBlock on a
supported component enables code to be executed whenever the component's
elevation changes. This may include state-based elevation changes (like
pressing on a Chip) or when the component's elevation value is changed
programmatically.

Changes

ActionSheet

Banner

Multi-component changes

v85.11.0

31 Jul 18:30
Compare
Choose a tag to compare

This minor release introduces Material Elevation support for Bottom Sheet,
Navigation Bar, Slider, and Tabs. Bottom Sheet removed its broken -init
initializer, and some internal clean-up was done to remove iOS 8 support.

New features

Support for Material Elevation expanded to several more components. APIs to
support overriding the computed value for mdc_baseElevation and to respond to
elevation changes are available. Assigning an elevationDidChangeBlock on a
supported component enables code to be executed whenever the component's
elevation changes. This may include state-based elevation changes (like
pressing on a Chip) or when the component's elevation value is changed
programmatically.

Changes

ActionSheet

BottomNavigation

BottomSheet

Elevation

NavigationBar

Slider

Tabs

Typography

private/Color

schemes/Typography

v85.10.0

30 Jul 17:51
Compare
Choose a tag to compare

85.10.0

This minor release expands support for trait collection and Material Elevation
changes in several components. Bottom Sheet and Navigation Drawer now support
shadows and elevation.

Breaking changes

The following breaking changes were made for Beta components that are not
published to CocoaPods.

  • MDCBottomNavigationBarController now positions child view controllers'
    views behind the Bottom Navigation bar.
  • MDCBannerView now uses a UITextView for the message text instead of a
    UILabel.

New features

Several more components received APIs that allow responding to
UITraitCollection changes. Assigning a traitCollectionDidBlock on a
supported component enables code to be executed in the component's
traitCollectionDidChange: method without subclassing.

Support for Material Elevation expanded to several more components. APIs to
support overriding the computed value for mdc_baseElevation and to respond to
elevation changes are available. Assigning an elevationDidChangeBlock on a
supported component enables code to be executed whenever the component's
elevation changes. This may include state-based elevation changes (like
pressing on a Chip) or when the component's elevation value is changed
programmatically.

The Bottom Sheet component, specifically MDCBottomSheetController now renders
a shadow by default. This may cause a very slight change in the shading around
the edges of the view. If desired, non-elevated Bottom Sheets can be configured
by setting the elevation property's value to 0.

Likewise, the Navigation Drawer's MDCBottomDrawerPresentationController
renders a shadow by default. To disable the shadow or modify the drawer's
elevation, set the elevation property to the desired value.

MDCBottomSheetController *bottomSheet =
     [[MDCBottomSheetController alloc] initWithContentViewController:mySheetContentVC];
bottomSheet.elevation = 0;

MDCTabBarView, currently in Beta, now provides an API to set its preferred
layout style.

MDCTabBarView *tabBarView = [[MDCTabBarView alloc] init];
tabBarView.preferredLayoutStyle = MDCTabBarViewLayoutStyleScrollable;

Changes

AppBar

Banner

BottomAppBar

BottomNavigation

BottomSheet

Buttons

Cards

Chips

Dialogs

Elevation

FeatureHighlight

FlexibleHeader

HeaderStackView

Ink

List

NavigationDrawer

PageControl

ProgressView

Ripple

Slider

Snackbar

Tabs

Read more