Material Components v55.4.0 Release Notes
-
๐ This minor release includes better layout guide and safe area insets support to
MDCAppBar
'sMDCAppBarContainerViewController
, added customization toMDCNavigationBar
title view layout, accessibility improvements and documentation.๐ New deprecations
๐
MDCNavigationBar
's propertyuseFlexibleTopBottomInsets
has been defaulted toYES
and has now been deprecated. It will eventually be removed and become the default behavior.๐ New features
AppBar now allows its wrapped content view controllers to make proper use of the top layout guide and additional safe area insets APIs. This is done using the newly added property to AppBar's
MDCAppBarContainerViewController
namedtopLayoutGuideAdjustmentEnabled
. An example on how to implement this behavior:MDCAppBarContainerViewController *appBarContainerViewController; UITableViewController *tableViewController = [[UITableViewController alloc] initWithStyle:UITableViewStylePlain]; appBarContainerViewController = [[MDCAppBarContainerViewController alloc] initWithContentViewController:tableViewController]; self.appBarContainerViewController.topLayoutGuideAdjustmentEnabled = YES;
๐ง NavigationBar now allows configuration of its title view layout behavior to be either "fill" or "center". The fill behavior is the default and existing behavior, which sets the title view's frame to fill the available navigation bar space. The center behavior will always attempt to center the title view within the navigation bar's bounds. 0๏ธโฃ The center behavior is desired by teams in the simple cases of when they want their title view to be centered within the navigation bar as best as possible. This is also the default behavior of UINavigationBar. Example usage:
MDCNavigationBar *navBar = [[MDCNavigationBar alloc] init]; navBar.titleView = [[UIView alloc] init]; navBar.titleViewLayoutBehavior = MDCNavigationBarTitleViewLayoutBehaviorCenter;
API changes
AppBar
MDCAppBarContainerViewController
๐ new property:
topLayoutGuideAdjustmentEnabled
inMDCAppBarContainerViewController
NavigationBar
MDCNavigationBar
๐ new property:
titleViewLayoutBehavior
inMDCNavigationBar
๐ deprecated property:
useFlexibleTopBottomInsets
inMDCNavigationBar
๐ | Type of change: | Deprecation message | |---|---| | From: |
useFlexibleTopBottomInsets
| 0๏ธโฃ | To: |Implement proper vertical alignment with the default YES behavior.
|๐ new enum
MDCNavigationBarTitleViewLayoutBehavior
with valuesMDCNavigationBarTitleViewLayoutBehaviorFill
andMDCNavigationBarTitleViewLayoutBehaviorCenter
.Component changes
AppBar
๐ Changes
- Add a wrapped table view controller example. (#4336) (featherless)
- Add example of an AppBar in a presented vc (#4351) (John Detloff)
- Fix VoiceOver escape gesture bug. (#4360) (featherless)
- Implement topLayoutGuideAdjustmentEnabled on the app bar container. (#4370) (featherless)
- ๐ [NavigationBar] Deprecate useFlexibleTopBottomInsets (#4358) (Ali Rabbani)
Buttons
๐ Changes
TextFields
๐ Changes
- Add placeholderLabel accessibilityLabel to textField accessibilityValue (#4319) (Andrew Overton)
- Tweak accessibility notification to prevent VoiceOver from cutting off (#4364) (Andrew Overton)
- ๐ [Documentation] Update TextField README.md (#4352) (ianegordon)
Snackbar
๐ Changes
- โ Fix Earl Grey test (#4349) (Robert Moore)
Slider
๐ Changes
- Fix accessibilityIncrement for discrete sliders (#4327) (John Detloff)
- Notify VoiceOver of MDCSlider value changes (#4350) (Andrew Overton)
NavigationBar
๐ Changes
- Add a titleViewLayoutBehavior API. (#4371) (featherless)
- ๐ Deprecate useFlexibleTopBottomInsets (#4358) (Ali Rabbani)
BottomSheet
๐ Changes
- Add a short bottom sheet example to MDCCatalog (#4318) (featherless)
Typography
๐ Changes
- [TextFields] Prevents functionally equivalent fonts from causing rendering jumps (#4344) (Will Larche)
PageControl
๐ Changes
Collections
๐ Changes
- ๐ Remove Earl Grey tests (#4348) (Robert Moore)
HeaderStackView
๐ Changes
- Change the layout behavior in MDCHeaderStack view to accommodate a topBar with flexible height. (#4355) (Ali Rabbani)
FlexibleHeader
๐ Changes
- Fix additionalSafeAreaInsets bug when topLayoutGuideAdjustmentEnabled is enabled. (#4354) (featherless)
- Only extract the top layout guide if the view has loaded. (#4357) (featherless)