Skip to content

v94.5.0

Compare
Choose a tag to compare
@randallli randallli released this 05 Dec 14:47
· 1846 commits to stable since this release

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

AppBar

Banner

Buttons

Chips

Dialogs

FlexibleHeader

Ripple