Releases: material-components/material-components-ios
v108.1.0
This minor release improves our support of the new iPadOS cursor APIs, deprecates a themer, and
adds the ability to animate a floating button's mode.
New deprecations
BottomSheet's ShapeThemer is now deprecated.
New features
Improved UIPointerInteraction support for ActionSheet, Buttons, and Dialogs.
MDCFloatingButton has a new animated API for animating the mode from normal to expanded.
[button setMode:MDCFloatingButtonModeExpanded animated:YES];
API changes
Component changes
ActionSheet
- Add UIPointerInteraction support for actions.. (Wenyu Zhang)
BottomSheet
- Deprecate the ShapeThemer. (Jeff Verkoeyen)
Buttons
- Add a snapshot test for floating buttons in normal mode with a label. (Jeff Verkoeyen)
- Add custom UIButtonPointerStyleProvider to MDCButton for better iPadOS pointer interaction. (Bryan Oltman)
- Add support to MDCFloatingButton for animating mode changes. (Jeff Verkoeyen)
- Disable pointer interactions for MDCFloatingButton during animation. (Bryan Oltman)
- Fix broken link in Buttons docs (Andrew Overton)
- Fix build error (Andrew Overton)
- Standardize all examples on the same Example pattern. (Jeff Verkoeyen)
- Standardize all test names on Tests. (Jeff Verkoeyen)
- Update MDCButton to use the proposed pointer effect in pointerStyleProvider. (Bryan Oltman)
- Use static storage for all local consts. (Jeff Verkoeyen)
Dialogs
- Add UIPointerInteraction support for buttons.. (Wenyu Zhang)
- Add a Testing target (Galia Kaufman)
- Adding accessory view tests (Galia Kaufman)
- Clean up some comments. (Dave MacLachlan)
- Cleanup: move deprecated API to private header. (Galia Kaufman)
- Disable broken test. (Jeff Verkoeyen)
- Resolve issue with sizing a dialog's accessoryView. (Nobody)
- Using Testing target in configuration snapshots. (Galia Kaufman)
- Using the new Testing target in accessory snapshots. (Galia Kaufman)
- Using the new Testing target in actions snapshots. (Galia Kaufman)
- Using the new Testing target in insets snapshots. (Galia Kaufman)
- Using the new Testing target in insets unit tests. (Galia Kaufman)
Ripple
TextControls
Multi-component changes
v108.0.0
This major release removes the default init
methods from MDCSemanticColorScheme, improves support
for iOS 13.4's pointer effects on iPads, and includes various bugfixes.
Breaking changes
MDCSemanticColorScheme's init
method is now unavailable. Please use initWithDefaults:
instead.
Component changes
ActionSheet
- Mark all Themer APIs as to-be-deprecated. (Jeff Verkoeyen)
AppBar
- Add example to dragons to demonstrate AppBar crash when VoiceOver is turned on and contentInset is set. (Yarden Eitan)
- Fix AppBar from jumping when contentOffset updates when VoiceOver is on. (Yarden Eitan)
BottomNavigation
- Add UIPointerHighlightEffects to BottomNavigation button items. (Bryan Oltman)
- Shrink UIPointerEffect frame size to fit content of navigation item views. (Bryan Oltman)
ButtonBar
- Add highlight pointer effect to MDCButtonBarButtons (Bryan Oltman)
- Remove custom shape for MDCButtonBarButton highlight effect. (Bryan Oltman)
- Set inkOffset when given asymmetric contentEdgeInsets. (Bryan Oltman)
Buttons
- Add inkViewOffset property to allow adjustment of inkView/rippleView. This is pre-work to address an issue in MDCButtonBar, where buttons are assigned asymmetric contentEdgeInsets by MDCAppBarButtonBarBuilder (Bryan Oltman)
- Add new fab anatomy pngs (Andrew Overton)
- Fix broken links in README (Andrew Overton)
- Update images again because they weren't using secondary theming before (Andrew Overton)
Dialogs
- Add a minimum dialog width. (Iryna Berezan)
- Add missing @c in several places of MDCAlertController. (Iryna Berezan)
- Fixing a repeated typo in comments "Default to" => "Defaults to". (Iryna Berezan)
- Size justified-aligned title-icons to fit the alert's width. (Galia Kaufman)
FlexibleHeader
- Crash fix for VoiceOver + ContentInset (Yarden Eitan)
NavigationDrawer
Tabs
- Add UIPointerInteraction support to MDCTabBar. (Bryan Oltman)
- Add UIPointerInteraction support to MDCTabBarView. (Bryan Oltman)
schemes/Color
- Delete init. (Cody Weaver)
v107.4.0
This minor release includes improvements to Chips, Dialogs, HeaderStackView, ProgressView, NavigationBar, NavigationDrawer, and Tabs.
New deprecations
Dialogs
MDCAlertControllerView
titleAlignment
,messageAlignment
, andtitleIconView
properties have been deprecated.
API changes
MDCTabBarView
- The previously private
effectiveLayoutStyle
is now publicly exposed as a readonly property.
Component changes
ActionSheet
- Fix umbrella header imports (Bryan Oltman)
- Move protocol definitions into separate header files (#9926) (copybara-service[bot])
ActivityIndicator
- Move protocol definitions into separate header files (Bryan Oltman)
AppBar
- Move protocol definitions into separate header files (Bryan Oltman)
BottomNavigation
- Move protocol definitions into separate header files (Bryan Oltman)
BottomSheet
- Move protocol definitions into separate header files (Bryan Oltman)
- Remove private header imports from MaterialBottomSheet.h (Bryan Oltman)
ButtonBar
- Move protocol definitions into separate header files (Bryan Oltman)
Chips
- Add call to invalidateIntrinsicContentSize when text entry moves up or down a line. (Bryan Oltman)
- Adds disabling chip example to the Dragons catalog. (Bryan Oltman)
- Project import generated by Copybara. (Nobody)
- Update intrinsicContentSize when text, font, or image change. (Cody Weaver)
Collections
- Move protocol definitions into separate header files (Nobody)
- Move protocol definitions into separate header files (Bryan Oltman)
- Move protocol definitions into separate header files (Bryan Oltman)
- Remove private header imports from MaterialCollections.h (Bryan Oltman)
- Remove private header imports from MaterialCollections.h (Nobody)
Dialogs
- # Problem The current snapshot is inaccurate because there is not enough room to layout all the dialog's elements, so spaces between the elements are inaccurate for many snapshots. (Galia Kaufman)
- Add TitleIcon snapshot tests. (Galia Kaufman)
- Custom title icon public API: Flip the priority between title icon and title custom view to mirror UIKit convention. (Iryna Berezan)
- Fix layout of configuration snapshot test. (Galia Kaufman)
- Minor grammatical fix. (Jeff Verkoeyen)
- Move protocol definitions into separate header files (Bryan Oltman)
- Moving non appearance API to private header (Galia Kaufman)
- Refactor titleIconViewSize. (Galia Kaufman)
- Support title icon content mode through custom titleIconImageView. (Galia Kaufman)
- recalculate alert layout after adding a title icon and title view (Galia Kaufman)
FeatureHighlight
- Minor docs fix. (Jeff Verkoeyen)
FlexibleHeader
- Add synonyms to hairline API documentation for increased discovery. (Jeff Verkoeyen)
- Move protocol definitions into separate header files (Bryan Oltman)
- Remove imports of private headers from MaterialFlexibleHeader.h (Bryan Oltman)
HeaderStackView
- Fix sizeThatFits method for MDCHeaderStackView to take into account both topBar and bottomBar. (Nobody)
Ink
- Move protocol definitions into separate header files (Bryan Oltman)
NavigationBar
- Problem: The title label does not resize in an edge case when the user enables bold text in settings->display & brightness and then opening the app if the title label was already on the screen. (Tony Lai)
- Remove default insets for leading titles. (Jeff Verkoeyen)
NavigationDrawer
- Move protocol definitions into separate header files (Bryan Oltman)
- This CL makes it such that when
bottomSafeAreaInsetsToAdjustContainerHeight
is set to YES, for performant scrolling the safe area is respected in calculating the max scroll origin, preventing a safe area presentation issue. (Jake Rockland) - This closes b/151091406, which was being caused because the presenting view controller is used to determine the frame of the bottom drawer's scroll view, which caused issues for situations in which the bottom drawer was presented from a modal view controller in the page or form sheet style. (Jake Rockland)
ProgressView
- Adding default accessibility label (Nobody)
- Adding default accessibility label (Yarden Eitan)
- Remove MDCProgressViewMotionSpec. (Wenyu Zhang)
Ripple
- Migrates Ripple to MDCAvailability. (Eric Lee)
- Move protocol definitions into separate header files (Bryan Oltman)
Slider
- Move protocol definitions into separate header files (Bryan Oltman)
Snackbar
- Move protocol definitions into separate header files (Bryan Oltman)
Tabs
- Expose effectiveLayoutStyle as a readonly property. (Alvin Wong)...
v107.3.0
This minor release includes several new APIs and improvements to Dialogs, AppBar, and Slider.
New features
MDCAppBarViewController now provides an accessibilityPerformEscapeDelegate
, which can be used to
customize the accessibilityPerformEscape
behavior of the AppBar without subclassing.
class SomeDelegate: NSObject, MDCAppBarViewControllerAccessibilityPerformEscapeDelegate {
func appBarViewControllerAccessibilityPerformEscape(_ appBarViewController: MDCAppBarViewController) -> Bool {
// Perform custom escape handling
return true
}
}
appBarViewController.accessibilityPerformEscapeDelegate = delegate
MDCAlertController has a new messageAlignment
API which can be used to adjust the alignment of the
message text:
alertController.messageAlignment = .right
MDCAlertController also now allow the order and alignment of actions to be customized with three new
APIs:
actionsHorizontalAlignment
actionsHorizontalAlignmentInVerticalLayout
orderVerticalActionsByEmphasis
alert.actionsHorizontalAlignment = .justified
alert.actionsHorizontalAlignmentInVerticalLayout = .justified
alert.orderVerticalActionsByEmphasis = true
MDCSlider now allows you to customize the appearance of the thumb track with the new
shouldDisplayThumbWithDiscreteValueLabel
API. Turning this API on will keep the thumb track
visible while the user is interacting with the slider.
slider.shouldDisplayThumbWithDiscreteValueLabel = true
Component changes
AppBar
- Add AppBarCustomButtonThemeExample. (#9883) (featherless)
- Add AppBarWithExpandableCells example. (#9873) (featherless)
- Add a delegate for customizing accessibilityPerformEscape behavior. (#9879) (featherless)
- Test the UINavigationController accessibilityPerformEscape behavior. (#9876) (featherless)
Dialogs
- Accessibility frame is larger than displayed text. (#9865) (Galia Kaufman)
- Add a snapshot test for extea long buttons (#9897) (Galia Kaufman)
- Add missed accessibility labels for the UI elements of the dialog. (#9895) (Galia Kaufman)
- Add snapshots tests for adjustable insets (#9899) (Galia Kaufman)
- Adding a snapshot test to verify correct layout of actions in edge cases found in issue: #8434. (#9875) (Galia Kaufman)
- Allow setting text alignment for alert message text (#9839) (Galia Kaufman)
- Fix actions order for center and justified actions alignment. (#9889) (Galia Kaufman)
- Fix comment line length (#9887) (Galia Kaufman)
- Fix incorrect content height for non-standard dialogs (#9864) (Galia Kaufman)
- Fix incorrect vertical layout for uppercase buttons (#9877) (Galia Kaufman)
- Fix vertical calculations for wide actions view (#9878) (Galia Kaufman)
- Publishing actions API (#9888) (Galia Kaufman)
- Refactoring alert actions test (#9886) (Galia Kaufman)
FlexibleHeader
- Add unit test to reproduce https://github.com/material-components/material-components-ios/issues/9863. (#9880) (featherless)
- Fix bug where hairline configuration would not persist. (#9881) (featherless)
- Fix jumping effect in a table view with dynamic cell heights. (#9872) (featherless)
Ink
- Refactor MDCInkView logic grappling with interplay between legacy ink layer and max ripple radius, ink style, etc (#9855) (Andrew Overton)
Slider
- Allow thumb to stay filled with discrete value label (#9866) (Yarden Eitan)
v107.2.0
This minor release includes the introduction of a self-sizing mechanism to MDCBaseCell, a new layout style for MDCTabBarView, and numerous improvements and bug fixes for BottomSheet, Snackbar, Dialogs, Ink, and TextFields.
New features
List
Having the UICollectionViewLayoutAttributes
you use with MDCBaseCell
conform to MDCSelfSizingLayoutAttributes
allows you to specify whether the height or the width should be fixed.
-(BOOL)isFixedWidth {
return 100;
}
-(BOOL)isFixedHeight {
return 100;
}
var isFixedWidth: Bool {
return 100;
}
var isFixedHeight: Bool {
return 100;
}
Tabs
Setting the preferredLayoutStyle
property on MDCTabBarView
to MDCTabBarViewLayoutStyleScrollableCentered
allows you to have a scrolling tab bar that centers the selected tab.
tabBarView.preferredLayoutStyle = MDCTabBarViewLayoutStyleScrollableCentered;
tabBarView.preferredLayoutStyle = .scrollableCentered
Component changes
BottomSheet
Chips
- Account for MDCChipField contentInset in placeholder width calculation (#9843) (Bryan Oltman)
- Add MDCChipField snapshot test for placeholder truncation (#9842) (Bryan Oltman)
- Add MDCChipField snapshot tests verifying text field placement (#9831) (Bryan Oltman)
- Add tips about "Adjusting chip sizes after changing the label". (#9852) (featherless)
- Do not include contentEdgeInsets for MDCChipField placeholder if no placeholder is present (#9847) (Bryan Oltman)
- Do not include insets in MDCChipField placeholder width if there is no placeholder (#9850) (Bryan Oltman)
- In MDCChipField, account for horizontal padding when calculating available width for text field (#9841) (Bryan Oltman)
- Move MDCChipField text input to a new line if text is too wide (#9845) (Bryan Oltman)
- Resize MDCChipField's textField frame instead of using left insets to align with chips (#9827) (Bryan Oltman)
- Resize MDCChipField's textField frame instead of using left insets to align with chips (#9837) (Bryan Oltman)
- Revert "Resize MDCChipField's textField frame instead of using left insets to align with chips" (#9828) (Bryan Oltman)
- Update MDCChipField to move long text from a line with chips to a new line. (#9826) (Bryan Oltman)
Dialogs
- Adding actions order tests (#9829) (Galia Kaufman)
- Removing enableAdjustableInsets and fixed-insets calculations. (#9832) (Galia Kaufman)
- Try to fix testActionsAreOrderedByEmphasis snapshot (#9862) (Andrew Overton)
Ink
- Conditionally maskToBounds on MDCInkView layer (a MDCLegacyInkLayer) when usesLegacyInkRipple is set to NO (#9818) (Andrew Overton)
List
- Add MDCSelfSizingLayoutAttributes (#9823) (Andrew Overton)
Snackbar
- Support orientation changes that respect safe area (#9838) (Yarden Eitan)
- add multi-window guessing support (#9830) (Yarden Eitan)
Tabs
- Add MDCTabBarViewLayoutStyleScrollableCentered (#9849) (Andrew Overton)
TextControls
- Update MDCBaseTextField docs (#9861) (Andrew Overton)
TextFields
Multi-component changes
- Remove traitCollection overrides from examples. (#9851) (Bryan Oltman)
v107.1.0
107.1.0
This minor release we added support to Snackbar to inform users when it has disappeared. As well as, improvements around touch targets for Chips, alignment improvements to Dialogs and various other bug improvements.
New features
In this release we added a new method to the MDCSnackbarManagerDelegate
protocol to inform users when the snackbar disappeared.
extension MyCustomViewController: MDCSnackbarManagerDelegate {
func snackbarDidDisappear() {
print("The snackbar disappeared I should act accordingly")
}
}
Component changes
Chips
- MDCChipCollectionViewCell to correctly support increased touch target (#9816) (Yarden Eitan)
- Update MDCChipCollectionViewFlowLayout to respect sectionInset (#9813) (Bryan Oltman)
Dialogs
- Consider all actions alignments for horizontal layout (#9805) (Galia Kaufman)
- Consider all actions alignments for vertical layouts (#9804) (Galia Kaufman)
FlexibleHeader
Snackbar
v107.0.0
In this major release we deleted the deprecated MDCAlertScheme
and MDCAlertControllerThemer
classes.
Breaking changes
MDCAlertScheme
and MDCAlertControllerThemer
have been deleted. Please use the MDCAlertController (MaterialTheming)
extension instead.
New features
In this release we added a new delegate
property to MDCAlertController
which exposes dialogs lifecycle events that are useful for impression logging. As well as various minor improvements to the Dialogs
component and other bug fixes.
API changes
Dialogs
new property: delegate
in MDCAlertController
new protocol: MDCAlertControllerDelegate
Component changes
BottomSheet
- Add example to reproduce issue 9773 (#9789) (Bryan Oltman)
- KVO
contentInset
property (#9726) (Robert Moore)
Chips
- Add snapshot tests for MDCChipCollectionViewFlowLayout (#9796) (Bryan Oltman)
- Refactor MDCChipCollectionViewFlowLayout (#9799) (Bryan Oltman)
Dialogs
- Adding actions alignment API in a private header. (#9795) (Galia Kaufman)
- Adding alignment snapshot tests (#9801) (Galia Kaufman)
- Adding justified actions alignment calculations to actions size calculations (#9800) (Galia Kaufman)
- Delete deprecated DialogThemer (#9776) (Bryan Oltman)
- Moving actions layout out to simplify layoutSubviews. (#9803) (Galia Kaufman)
- Support impressions logging in Material Design Dialogs. (#9794) (Galia Kaufman)
- Use consistent syntax for float constants (#9750) (Galia Kaufman)
TextField
v106.0.0
106.0.0
In this major release we deleted the deprecated themer: MDCFloatingButtonShapeThemer
.
Breaking changes
Deleted MDCFloatingButtonShapeThemer
class, please use the theming extensions.
Learn more at https://github.com/material-components/material-components-ios/blob/develop/docs/theming.md#migration-guide-themers-to-theming-extensions
New features
In this release we added the MDCFilledTextArea
and MDCOutlinedTextArea
components, made improvements to our Dialogs component, and added other bug fixes.
API changes
BottomNavigation
new property: itemsHorizontalPadding
in MDCBottomNavigationBar
TextControls
new property: label
in MDCBaseTextArea
new property: labelBehavior
in MDCBaseTextArea
new property: leadingAssistiveLabel
in MDCBaseTextArea
new property: trailingAssistiveLabel
in MDCBaseTextArea
new property: minimumNumberOfVisibleRows
in MDCBaseTextArea
new property: maximumNumberOfVisibleRows
in MDCBaseTextArea
new method: setFloatingLabelColor:forState:
in MDCBaseTextArea
new method: floatingLabelColorForState
in MDCBaseTextArea
new method: setNormalLabelColor:forState:
in MDCBaseTextArea
new method: normalLabelColorForState:
in MDCBaseTextArea
new method: setTextColor:forState:
in MDCBaseTextArea
new method: textColorForState:
in MDCBaseTextArea
new method: setLeadingAssistiveLabelColor:forState:
in MDCBaseTextArea
new method: leadingAssistiveLabelColorForState:
in MDCBaseTextArea
new method: setTrailingAssistiveLabelColor:forState:
in MDCBaseTextArea
new method: trailingAssistiveLabelColorForState:
in MDCBaseTextArea
new class: MDCFilledTextArea
new class: MDCOutlinedTextArea
Component changes
BottomAppBar
- Migrates BottomAppBar to MDCAvailability. (#9729) (Randall Li)
BottomNavigation
- Add horizontal padding property to MDCBottomNavigationBar (#9765) (Andrew Overton)
Buttons
- Deletes deprecated MDCFloatingButtonShapeThemer (#9746) (Bryan Oltman)
ButtonBar
- Do not allow implicit downcasting of item views. (#9761) (featherless)
- Fix crash when assigning tint color, title, or image to bar button item with custom view. (#9759) (featherless)
Collections
- Migrates Collections to MDCAvailability. (#9712) (Randall Li)
Dialogs
- Add orderVerticalActionsByEmphasis flag (#9775) (Galia Kaufman)
- Fix adjustable insets for title icon. (#9752) (Galia Kaufman)
- Group UIViewController methods of MDCAlertController. (#9784) (Galia Kaufman)
- Refactor actions layout calculations. (#9783) (Galia Kaufman)
- Updating adjustable action margins (#9782) (Galia Kaufman)
Ink
- Remove additional strong reference to self.layer (#9755) (Bryan Oltman)
OverlayWindow
- Migrates Overlay Window to MDCAvailability. (#9730) (Randall Li)
Shapes
TextControls
- Add text area example (#9772) (Andrew Overton)
- Add first pass of unit tests for MDCBaseTextArea (#9754) (Andrew Overton)
- Add outlined text areas (#9771) (Andrew Overton)
- Add the rest of MDCBaseTextArea (#9731) (Andrew Overton)
- MDCTextControlLabelState renamed to MDCTextControlLabelPosition and other changes (#9753) (Andrew Overton)
- add filled text areas (#9770) (Andrew Overton)
private/ThumbTrack
- Migrates Thumb Track to MDCAvailability. (#9714) (Randall Li)
v105.0.2
This hotfix patch release fixes a crasher with ButtonBars when using custom item views and tint colors.