v94.5.0
94.5.0
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: APIs
let 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 MDCDialogTransitionController
Flexible header
new enum value: MDCFlexibleHeaderShiftBehaviorHideable
in MDCFlexibleHeaderShiftBehavior
Ripple
new property: usesSuperviewShadowLayerAsMask
in MDCRippleView
Component 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
Dialogs
FlexibleHeader
- Add MDCFlexibleHeaderShiftBehaviorHideable. (#9026) (featherless)
- Add test that validates all defaults. (#9036) (featherless)
- Document the default value of shiftBehavior. (#9037) (featherless)
Ripple
- Add usesSuperviewShadowLayerAsMask flag. (#8822) (featherless)