Skip to content
This repository was archived by the owner on Dec 11, 2025. It is now read-only.

v71.0.0

Choose a tag to compare

@randallli randallli released this 07 Dec 15:13
· 4002 commits to stable since this release

71.0.0

In this release we fixed some NavigationDrawer/BottomDrawer bugs and started using the theming extensions. This includes using categories on the components and a global container scheme.

Breaking changes

  • MDCColorScheming has added the copy attribute to its properties.
  • MDCTypographyScheming has added the copy attribute to its properties.
  • MDCFloatingButtonThemer changes its mapping to use a title color #5912

New features

Button theming

    textButton.applyTextTheme(withScheme: MDCContainerScheme())

ButtonBar theming

  var scheme: MDCContainerScheming {
    let scheme = MDCContainerScheme()
    scheme.colorScheme = colorScheme
    scheme.typographyScheme = typographyScheme
    return scheme
  }
  ...
  buttonBar.applyPrimaryTheme(withScheme: scheme)

Dialogs usage example

  NSString *titleString = @"Reset Settings?";
  NSString *messageString = @"This will reset your device to its default factory settings.";

  MDCAlertController *alert = [MDCAlertController alertControllerWithTitle:titleString
                                                                   message:messageString];
  alert.mdc_adjustsFontForContentSizeCategory = YES;

  MDCActionHandler handler = ^(MDCAlertAction *action) {
    NSLog(@"action pressed: %@", action.title);
  };

  MDCAlertAction *agreeAaction = [MDCAlertAction actionWithTitle:@"Cancel"
                                                        emphasis:MDCActionEmphasisLow
                                                         handler:handler];
  [alert addAction:agreeAaction];

  MDCAlertAction *disagreeAaction = [MDCAlertAction actionWithTitle:@"Accept"
                                                           emphasis:MDCActionEmphasisLow
                                                            handler:handler];
  [alert addAction:disagreeAaction];
  [MDCAlertControllerThemer applyScheme:self.alertScheme toAlertController:alert];

  [self presentViewController:alert animated:YES completion:NULL];

Component changes

Buttons

MDCFloatingButtonThemer changes its mapping to use a title color #5912

Banner

An MVP view with layout was added to examples.

Container scheme

We have created a global container scheme to hold all subsystems schemes. We have started to move our theming APIs into class extensions/catgories. These are the components that have landed some of these changes:

  • ButtonBar
  • Button

Changes

ActionSheet

ActivityIndicator

AnimationTiming

ButtonBar

Buttons

Cards

Dialogs

NavigationDrawer

Snackbar

schemes/Color

schemes/Typography

Multi-component changes