v88.0.0
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
- Update cells when the background is set. (#8341) (Cody Weaver)
Banner
Buttons
- Add theming extension. (#8285) (Wenyu Zhang)
- Clarify docs for accessibilityTraitsIncludesButton. (#8328) (Robert Moore)
- Delete deprecated mdc_legacyFontScaling API. (#8306) (Wenyu Zhang)
Chips
- delete deprecated mdc_legacyFontScaling. (#8305) (Wenyu Zhang)
Elevation
- Add a convenience method to resolve dynamic color only when traitCollection's color appearance has changed. (#8315) (Wenyu Zhang)
- Fix spelling error (#8336) (Cody Weaver)
Ink
- Remove use of
NS_ASSUME_NONNULL_BEGIN
. (#8298) (Robert Moore)
List
- Fix docs markdown. (#8294) (Robert Moore)
- Fix missing images on material.io. (#8310) (Robert Moore)
- Fix remaining code blocks. (#8313) (Robert Moore)
- Fix typo in README (#8302) (Robert Moore)
Ripple
- Fixing selection state in Ripple (#7609) (Galia Kaufman)
Shapes
- Update border color to support dynamic color (#8308) (Cody Weaver)
Slider
- Remove use of
NS_ASSUME_NONNULL_BEGIN
. (#8300) (Robert Moore)
Snackbar
- Add dynamic type M2 support. (#8303) (Wenyu Zhang)
- Adding traitCollection and elevationDidChange blocks of the messageView in the manager. (#8330) (Yarden Eitan)
TextFields
- Add MDCBaseTextFieldLayout object with leading/trailing view behavior (#8292) (Andrew Overton)
- Add MaterialElevation support. (#8325) (Cody Weaver)
- Add MaterialElevation support. (#8333) (Cody Weaver)
- Remove Experimental BUILD targets. (#8322) (Robert Moore)
- Remove use of
NS_ASSUME_NONNULL_BEGIN
. (#8301) (Robert Moore) - Revert "Revert "[TextFields] Add MDCBaseTextFieldLayout object with leading/trailing view behavior (#8292)" #8316" (#8320) (Andrew Overton)
- Revert "[TextFields] Add MDCBaseTextFieldLayout object with leading/trailing view behavior (#8292)" (#8316) (Robert Moore)
- Delete experimental textfields (#8317) (Andrew Overton)
private/Color
- Add a method for MDC to call resolveColorWithTraitCollection on pre-iOS 13 (#8307) (Cody Weaver)
- Remove use of
NS_ASSUME_NONNULL_BEGIN
. (#8299) (Robert Moore)