Releases: material-components/material-components-ios
v93.3.0
This minor release adds two new APIs to FlexibleHeader for contexts involving multiple tracking
scroll views (such as tabbed interfaces).
New features
MDCFlexibleHeaderView has a new API,
allowShadowLayerFrameAnimationsWhenChangingTrackingScrollView
, that can be used to enable shadow
layer frame animations when the header's height is animated after switching to a new tracking
scroll view. This flag is false by default, but will be enabled and then deleted in the future, so
please consider enabling it wherever you instantiate a flexible header or app bar.
MDCFlexibleHeaderView has a new animationDelegate
API that can be used to react to the completion
of the animation that occurs when changing tracking scroll views.
Component changes
FlexibleHeader
v93.2.0
In this minor release TextFields support multiline error/helper text, FeatureHighlight supports Dynamic Type, OverlayWindow supports iOS 13 UIWindow scene initializer API, along with a PageControl dot placement fix, and additional component testing.
New features
FeatureHighlight
You can now set adjustsFontForContentSizeCategory
on MDCFeatureHighlightViewController
to automatically update your scalable font when content size category changes.
Namely, when adjustsFontForContentSizeCategory
is set to YES
the title and body fonts will scale appropriately if given a scalable font.
OverlayWindow
MDCOverlayWindow
now supports being initialized with initWithWindowScene:
as part of the new UIWindow
iOS 13 APIs.
TextFields
MDCTextField
now supports multiline error and helper texts. To set this up you will need to change the number of lines and word wrapping of the label:
MDCTextField *textField = [[MDCTextField alloc] init];
textField.leadingUnderlineLabel.numberOfLines = 0;
textField.leadingUnderlineLabel.lineBreakMode = NSLineBreakByWordWrapping;
API changes
Component changes
Changes
Banner
- Add snapshot tests for setting preferredFont with adjustsFontForContentSizeCategory (#8623) (Yarden Eitan)
Buttons
- Support non-stateful fonts in theming. (#8650) (Robert Moore)
Cards
- New toggle-button example (#8663) (Galia Kaufman)
Chips
- Add snapshot tests for setting preferredFont with adjustsFontForContentSizeCategory (#8624) (Yarden Eitan)
Dialogs
- Add tests for Dynamic Type. (#8675) (Robert Moore)
- Remove broken snapshot tests. (#8676) (Robert Moore)
FeatureHighlight
- Add adjustsFontForContentSizeCategory suppor… (#8655) (Yarden Eitan)
- Add snapshot tests for setting preferredFont with adjustsFontForContentSizeCategory (#8629) (Yarden Eitan)
FlexibleHeader
List
- Add snapshot tests for setting preferredFont with adjustsFontForContentSizeCategory (#8636) (Yarden Eitan)
OverlayWindow
- Add initWithWindowScene: initializer (#8633) (Bryan Oltman)
PageControl
ShadowLayer
TextFields
- Add density and preferredContainerHeight as private functionality (#8607) (Andrew Overton)
- Add filled and outlined positioning references (#8627) (Andrew Overton)
- Add filled style object (#8657) (Andrew Overton)
- Add outlined style object (#8658) (Andrew Overton)
- Add path drawing utils for style objects (#8628) (Andrew Overton)
- Add tests for preferredFont APIs. (#8635) (Robert Moore)
- Bring back original textInsets API for clients sub… (#8688) (Yarden Eitan)
- Add support for multi-line in helper and error tex… (#8665) (Yarden Eitan)
v93.1.1
This patch hotfix release addresses a bug in NavigationDrawer where the scrim is visible when the drawer's trackingScrollView is scrolled to the end of the content.
Changes
NavigationDrawer
v93.1.0
This minor hotfix release deprecates the buttonFont
API of
MDCAlertController
.
New deprecations
The buttonFont
API on MDCAlertController
is being deprecated and will soon
be removed. Clients should instead use buttonForAction:
to access and theme
each button as desired.
Objective-C
for (MDCAlertAction *action in self.actions) {
MDCButton *button = [self buttonForAction:action];
// Perform button customization
}
API changes
Dialogs
MDCAlertController
modified property: buttonFont
in MDCAlertController
Type of change: | Deprecation message |
---|---|
From: | `` |
To: | Please use buttonForAction: to set button properties. |
modified property: buttonFont
in MDCAlertController
Type of change: | Deprecation |
---|---|
From: | 0 |
To: | 1 |
Changes
Dialogs
- Mark
buttonFont
deprecated. (#8649) (Robert Moore)
v93.0.0
This major release deletes MaskedTransition, fixes bugs in ActionSheet, and adds an API to Buttons related to fonts.
Breaking changes
MaskedTransition has been deleted.
Changes
ActionSheet
- Fix behavior of
alwaysAlignTitleLeadingEdges
. (#8610) (Robert Moore)
Buttons
- Add API to disable state-based fonts. (#8606) (Robert Moore)
Chips
- Add an "animated" button to the filter example. (#8615) (featherless)
- Deprecate MDCChipViewTypographyThemer. (#8590) (featherless)
- Fold MDCChipViewTypographyThemer into the Theming extension. (#8591) (featherless)
- Fold more supplemental code into the examples. (#8605) (featherless)
- Fold supplemental code into the examples. (#8587) (featherless)
Dialogs
- Remove uncontrolled snapshot tests. (#8619) (Robert Moore)
Tabs
v92.5.0
This minor release prepares MDCButton for the deprecation and removal of its
titleFont:forState:
APIs in a future release.
Changes
Buttons
- Add API to disable state-based fonts. (#8606) (Robert Moore)
v92.4.0
This minor release addresses issues with Dialogs in Dark Mode, adds delegate methods for Navigation Drawer, and makes Outlined Text Areas more configurable.
New deprecations
This minor release deprecates Chips+ChipThemer and MDCChipViewFontThemer.
New features
MDCTextInputControllerOutlinedTextArea now allows users to specify minimumLines
and expandsOnOverflow
.
Objective -C
MDCTextInputControllerOutlinedTextArea *textInputControllerOutlinedTextArea =
[[MDCTextInputControllerOutlinedTextArea alloc] initWithTextInput:self.textField];
textInputControllerOutlinedTextArea.minimumLines = 1;
textInputControllerOutlinedTextArea.expandsOnOverflow = YES;
Swift
let textInputControllerOutlinedTextArea =
MDCTextInputControllerOutlinedTextArea(textInput: textField)
textInputControllerOutlinedTextArea.minimumLines = 1
textInputControllerOutlinedTextArea.expandsOnOverflow = true
MDCBottomDrawerPresentationControllerDelegate has new methods that allow clients to respond to animation lifecycle events and touches to the scrim.
Touch events set to delegate
Touch events are propagated to delegate to allow clients to interpret touches in the scrim area.
Objective-C
navigationDrawer.dismissOnBackgroundTap = NO;
navigationDrawer.shouldForwardTouchEvents = YES;
...
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
}
- (void)touchesEnded:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
}
Swift
navigationDrawer.dismissOnBackgroundTap = false
navigationDrawer.shouldForwardTouchEvents = true
...
override public func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
}
public override func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent?) {
}
Animation events sent to delegate
The animation lifecycle events are forwarded to the delegate so that clients can respond to them.
Objective-C
- (void)bottomDrawerControllerWillTransitionOpen:(nonnull MDCBottomDrawerViewController *)controller
withCoordinator:
(nullable id<UIViewControllerTransitionCoordinator>)
transitionCoordinator
targetYOffset:(CGFloat)targetYOffset {
}
- (void)bottomDrawerControllerDidEndOpenTransition:(MDCBottomDrawerViewController *)controller {
}
- (void)
bottomDrawerControllerWillTransitionClosed:(nonnull MDCBottomDrawerViewController *)controller
withCoordinator:(nullable id<UIViewControllerTransitionCoordinator>)
transitionCoordinator
targetYOffset:(CGFloat)targetYOffset {
}
- (void)bottomDrawerControllerDidEndCloseTransition:(MDCBottomDrawerViewController *)controller {
}
- (void)bottomDrawerControllerDidChangeTopYOffset:
(nonnull MDCBottomDrawerViewController *)controller
yOffset:(CGFloat)yOffset {
}
Swift
public func bottomDrawerControllerWillTransitionOpen(_ controller: MDCBottomDrawerViewController, with transitionCoordinator: UIViewControllerTransitionCoordinator?, targetYOffset:CGFloat) {
}
public func bottomDrawerControllerDidEndOpenTransition(_ controller: MDCBottomDrawerViewController) {
}
public func bottomDrawerControllerWillTransitionClosed(_ controller: MDCBottomDrawerViewController, with transitionCoordinator: UIViewControllerTransitionCoordinator?) {
}
public func bottomDrawerControllerDidEndCloseTransition(_ controller: MDCBottomDrawerViewController) {
}
public func bottomDrawerControllerDidChangeTopYOffset(_ controller: MDCBottomDrawerViewController, yOffset: CGFloat) {
}
Changes
BottomSheet
- Disable pan gesture on UIControl (#8491) (Linksmt)
Chips
- Add Dynamic Type support to ChipsActionExampleViewController. (#8565) (featherless)
- Add Dynamic Type support to ChipsInputExampleViewController. (#8569) (featherless)
- Add Dynamic Type support to the remaining chip collection examples. (#8567) (featherless)
- Deprecate Chips+ChipThemer. (#8593) (featherless)
- Deprecate MDCChipViewFontThemer. (#8589) (featherless)
- Move ChipModel into ChipsTypicalUseViewController. (#8579) (featherless)
- Move all example assets to a supplemental file. (#8577) (featherless)
- Remove all lazy initialization of models from examples. (#8576) (featherless)
- Remove sizing chips from all remaining examples. (#8575) (featherless)
- Remove unnecessary explicit layout code. (#8564) (featherless)
- Remove unnecessary theming logic. (#8562) (featherless)
Dialogs
- Explicitly set title and message color (#8588) (Cody Weaver)
NavigationDrawer
- Add delegate methods to allow the presenting VC to gain access to the transitionCoordinator used during the present/dismiss transitions. (#8566) (Randall Li)
- Allow touch events to propagate to delegate for MDCBottomNavigationDrawer (#8578) (Randall Li)
TextFields
Typography
- Remove checks for
systemFontOfSize:weight:
. (#8581) (Robert Moore)
Multi-component changes
- Reran ./scripts/generate_all_readmes (#8557) (Randall Li)
v92.3.1
This minor hotfix adds a missing podspec dependency to TextFields+ContainedInputView extension.
Component changes
TextFields
v92.3.0
This minor release introduces new color properties to TextFields and removes max size constraints on ActivityIndicator.
New features
MDCTextInputControllerBase now allows setting the input field's border in the resting state using borderStrokeColor
:
MDCTextField *textField = [[MDCTextField alloc] init];
MDCTextInputControllerOutlined *controller =
[[MDCTextInputControllerOutlined alloc] initWithTextInput:textField];
controller.borderStrokeColor = UIColor.redColor;
MDCTextInputControllerFloatingPlaceholder now allows setting the error color of the border of the input field while being in edit mode using floatingPlaceholderErrorActiveColor
:
let textFieldFilled = MDCTextField()
let textFieldControllerFilled = MDCTextInputControllerFilled(textInput: textFieldFilled)
textFieldControllerFilled.floatingPlaceholderErrorActiveColor = .red
Component changes
Changes
ActivityIndicator
- Removes 72dp radius limit on activity indicator (#8534) (Josh Converse)
Tabs
- Add TabBarView API to set content padding (#8529) (Robert Moore)
TextFields
- Add assistive label view (#8539) (Andrew Overton)
- Add some MDCTextControl properties and some small methods I forgot to implement (#8535) (Andrew Overton)
- Adding border stroke color (#8510) (Galia Kaufman)
- Adding floatingPlaceholder Error Active color API to controller (#8526) (Galia Kaufman)
- Bring more of base positioning reference over (#8530) (Andrew Overton)
- Minor cleanup (#8543) (Andrew Overton)
Multi-component changes
v92.2.0
This minor hotfix release adds a new accessory view feature to MDCAlertController.
New features
MDCAlertController has a new accessoryView
property. This property can be used to add custom views
to the alert controller. Example usage:
let alert = MDCAlertController(title: "This is a title", message: "This is a message")
let textField = UITextField()
textField.placeholder = "This is a text field"
alert.accessoryView = textField
Changes
Dialogs
- Add accessoryView to MDCAlertController (#8538) (Jacob Lukas)