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: 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