Material Components v94.5.0 Release Notes
Release Date: 2019-12-05 // over 4 years ago-
๐ This minor release introduces new APIs to AppBar, FlexibleHeader and Dialogs. AppBar and FlexibleHeader adds behavior to mimic the behavior of UINavigationController's ๐
setNavigationBarHidden:
. Dialogs exposes transition APIs to customize the presentation animations. ๐ We also deprecated some themers for Chips and Buttons.๐ New deprecations
Chips
MDCChipViewColorThemer
๐ Use Chips+Theming to theme the ChipView instead.
MDCChipViewShapeThemer
๐ Use Chips+Theming to theme the ChipView instead.
Buttons
MDCFloatingButtonColorThemer
Please use [MDCFloatingButton applySecondaryThemeWithScheme:] instead.
MDCContainedButtonColorThemer
Please use [MDCButton applyContainedThemeWithScheme:] instead.
๐ New features
AppBar
The new
shouldSetNavigationBarHiddenHideAppBar
flag allows view controllers to control the visibility of their app bar via the standard UINavigationController setNavigationBarHidden: APIslet contentViewController = PresentedViewController() let navigationController = MDCAppBarNavigationController() navigationController.shouldSetNavigationBarHiddenHideAppBar = true navigationController.delegate = self navigationController.pushViewController(contentViewController, animated: false)
FlexibleHeader
This new shift behavior mode enables the flexible header to mimic the behavior of UINavigationController's
setNavigationBarHidden:
.Swift
headerViewController.headerView.shiftBehavior = .hideable // You can now toggle visibility of the header view using the following invocations: headerViewController.headerView.shiftHeaderOffScreen(animated: true) headerViewController.headerView.shiftHeaderOnScreen(animated: true) override func childViewControllerForStatusBarHidden() -> UIViewController? { return headerViewController }
Objective-C
headerViewController.headerView.shiftBehavior = MDCFlexibleHeaderShiftBehaviorHideable; // You can now toggle visibility of the header view using the following invocations: [headerViewController.headerView shiftHeaderOffScreenAnimated:YES]; [headerViewController.headerView shiftHeaderOnScreenAnimated:YES]; - (UIViewController *)childViewControllerForStatusBarHidden { return _headerViewController; }
API changes
AppBar
๐ new property:
navigationBarHidden
in MDCAppBarNavigationController ๐ new property: `shouldSetNavigationBarHiddenHideAppBar;Chips
๐ deprecated class: MDCChipViewColorThemer. Use Chips+Theming instead. ๐ deprecated class: MDCChipViewShapeThemer. Use Chips+Theming instead.
๐ Dialogs
๐ new property:
dialogTransform
in MDCDialogPresentationController๐ new property:
opacityAnimationDuration
in MDCDialogTransitionController ๐ new property:scaleAnimationDuration
in MDCDialogTransitionController ๐ new property:dialogInitialScaleFactor
in MDCDialogTransitionControllerFlexible header
๐ new enum value:
MDCFlexibleHeaderShiftBehaviorHideable
in MDCFlexibleHeaderShiftBehaviorRipple
๐ new property:
usesSuperviewShadowLayerAsMask
in MDCRippleViewComponent changes
๐ Changes
ActionSheet
- ๐จ Refactor edge insets API snapshot tests. (#9035) (Robert Moore)
AppBar
- Add a shouldSetNavigationBarHiddenHideAppBar behavior flag. (#9001) (featherless)
- โ Rename test cases to match component conventions. (#9038) (featherless)
Banner
Buttons
- ๐ Deprecating MDCContainedButtonColorThemer (#9051) (Galia Kaufman)
- ๐ Deprecating MDCFloatingButtonColorThemer (#9050) (Galia Kaufman)
Chips
- ๐ Mark MDCChipViewColorThemer and MDCChipViewShapeThemer as deprecated (#9040) (Bryan Oltman)
๐ Dialogs
- ๐ง Add configuration options to MDCDialogTransitionController (#9033) (Bryan Oltman)
FlexibleHeader
- Add MDCFlexibleHeaderShiftBehaviorHideable. (#9026) (featherless)
- โ Add test that validates all defaults. (#9036) (featherless)
- 0๏ธโฃ Document the default value of shiftBehavior. (#9037) (featherless)
Ripple
- Add usesSuperviewShadowLayerAsMask flag. (#8822) (featherless)