Material Components for iOS v107.2.0 Release Notes
Release Date: 2020-03-10 // about 4 years ago-
๐ 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 withMDCBaseCell
conform toMDCSelfSizingLayoutAttributes
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 onMDCTabBarView
toMDCTabBarViewLayoutStyleScrollableCentered
allows you to have a scrolling tab bar that centers the selected tab.tabBarView.preferredLayoutStyle = MDCTabBarViewLayoutStyleScrollableCentered;
tabBarView.preferredLayoutStyle = .scrollableCentered
Component changes
BottomSheet
- ๐ Anchor movement of the bottom sheet along the y axis. (#9835) (featherless)
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)