Skip to content

Releases: material-components/material-components-ios

v95.0.1

09 Dec 04:42
Compare
Choose a tag to compare

95.0.1

In this hotfix we revert c83333f to address issue where dialog messages are not properly displayed
during rotation while VoiceOver is on.

Component changes

Changes

Dialogs

v95.0.0

06 Dec 16:37
Compare
Choose a tag to compare

95.0.0

In this major release we deleted a bunch of APIs already marked deprecated in the Button Bar,
Button, Ink, Chip componnts.

Breaking changes

Button

MDCButton removed cornerRadius.

Chips

We removed a bunch of themer classes and protocols that are not part of our latest theming offering.

New deprecations

Navigation Bar

We deprecated the color themer in preperation of deleting it. Use theming instead.

Outlined Button

We deprecated the color themer in preperation of deleting it. Use theming instead.

Text Button

We deprecated the color themer in preperation of deleting it. Use theming instead.

Cards

We deprecated the color themer in preperation of deleting it. Use theming instead.

Tab Bar

We deprecated the color themer in preperation of deleting it. Use theming instead.

Text Field

We deprecated the color themer in preperation of deleting it. Use theming instead.

Thumb Track

We deprecated the private thumbtrack component's thumbMaxRippleRadius.

API changes

MDCButton

removed property: cornerRadius in MDCButton

Chips

removed protocol: MDCChipViewScheming. Use Chips+Theming instead.

removed class: MDCChipViewThemer. Use Chips+Theming instead.

removed class: MDCChipViewColorThemer. Use Chips+Theming instead.

removed class: MDCChipViewFontThemer. Use Chips+Theming instead.

removed class: MDCChipViewShapeThemer. Use Chips+Theming instead.

removed class: MDCChipViewTypographyThemer. Use Chips+Theming instead.

Navigation Bar

deprecated class: MDCBottomNavigationBarColorThemer. Use MaterialBottomNavigation+Theming instead.

Outlined Button

deprecated class: MDCOutlinedButtonColorThemer. Please use
[MDCButton applyOutlinedThemeWithScheme:] instead. (Note: Color theming is no longer available as an
independent API.

Text Button

deprecated class: MDCTextButtonColorThemer. Please use [MDCButton applyTextThemeWithScheme:]
instead. (Note: Color theming is no longer available as an independent API.)")

Cards

deprecated class: MDCCardsColorThemer. Please use MaterialCards+Theming instead.

Tab Bar

deprecated class: MDCTabBarFontThemer. Please use the theming extension instead.

Text Field

deprecated class: MDCTextFieldColorThemer. Please use the MaterialTextFields+Theming instead.

Thumb Track

deprecated property: thumbMaxRippleRadius in MDCThumbTrack. Opt-in to Ripple by setting
enableRippleBehavior to YES, and then use thumbRippleMaximumRadius instead. Learn more at
https://github.com/material-components/material-components-ios/tree/develop/components/Ink#migration-guide-ink-to-ripple

Component changes

Changes

Banner

BottomNavigation

ButtonBar

Buttons

Cards

Chips

Ink

Tabs

TextFields

private/ThumbTrack

Multi-component changes

v94.5.0

05 Dec 14:47
Compare
Choose a tag to compare

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

v94.4.0

27 Nov 18:03
Compare
Choose a tag to compare

This minor release introduces new APIs to ActionSheet, BottomSheet and FlexibleHeader. Additionally, it includes new theming extension for TextControls component.

New features

TextControls component now has a theming extension.

MDCFilledTextField *filledTextField = [[MDCFilledTextField alloc] init];
MDCContainerScheme *containerScheme = [[MDCContainerScheme alloc] init];

[filledTextField applyThemeWithScheme:containerScheme];
let filledTextField = MDCFilledTextField()
let scheme = MDCContainerScheme()

filledTextField.applyTheme(withScheme: scheme)

API changes

ActionSheet

MDCActionSheetController

new property: contentEdgeInsets in MDCActionSheetController

BottomSheet

MDCBottomSheetController

new property: dismissOnDraggingDownSheet in MDCBottomSheetController

MDCBottomSheetPresentationController

new property: dismissOnDraggingDownSheet in MDCBottomSheetPresentationController

MDCBottomSheetTransitionController

new property: dismissOnDraggingDownSheet in MDCBottomSheetTransitionController

FlexibleHeader

MDCFlexibleHeaderView(ShiftBehavior)

new property: shiftedOffscreen in MDCFlexibleHeaderView(ShiftBehavior)

Component changes

Changes

ActionSheet

BottomSheet

Buttons

FeatureHighlight

FlexibleHeader

ShadowElevations

TextControls

v94.3.0

25 Nov 18:49
Compare
Choose a tag to compare

This minor release primarily consists of accessibility improvements. A number of components now provide increased support for VoiceOver and Dynamic Type, and many components have been audited to make sure minimum touch target requirements and minimum color contrast requirements are met. Additionally, many examples in our Catalog and Dragons apps have been improved from an accessibility standpoint.

New deprecations

  • adjustsFontForContentSizeCategoryWhenScaledFontIsUnavailable in MDCSnackbarManager

  • adjustsFontForContentSizeCategoryWhenScaledFontIsUnavailable in MDCSnackbarMessageView

Component changes

ActionSheet

ActivityIndicator

AppBar

Banner

BottomNavigation

BottomSheet

ButtonBar

Buttons

Cards

Chips

Dialogs

FeatureHighlight

Ink

List

NavigationDrawer

Read more

v94.2.0

14 Nov 21:43
Compare
Choose a tag to compare

This minor release introduces new APIs to MDCAppBarViewController and MDCSlider. Additionally, it includes some fixes for Banner constraints.

New Features

AppBar

MDCAppBarViewController allows automatically adjust the height of the app bar based on its headerStackView.

Objective-C

MDCAppBarViewController *appBar= [[MDCAppBarViewController alloc] init];
appBar.shouldAdjustHeightBasedOnHeaderStackView = YES;

Swift

let appBar = MDCAppBarViewController()
appBar.shouldAdjustHeightBasedOnHeaderStackView = true

Slider

MDCSlider allows having a continuous Slider that shows track tick marks.

Objective-C

MDCSlider *slider = [[MDCSlider alloc] init];
slider.discrete = NO;
slider.numberOfDiscreteValues = 5;

Swift

let slider = MDCSlider()
slider.discrete = false
slider.numberOfDiscreteValues = 5;

API changes

AppBar

MDCAppBarViewController

new property: shouldAdjustHeightBasedOnHeaderStackView in MDCAppBarViewController

Slider

MDCSlider

new property: discrete in MDCSlider

Component changes

AppBar

Banner

Slider


v94.1.0

13 Nov 21:11
Compare
Choose a tag to compare

94.1.0

This minor release introduces new APIs to FlexibleHeader and Ripple, and updates the appearance of MDCSnackbar to the latest style. The release also includes bug fixes for multiple components.

New Features

FlexibleHeader

FlexibleHeader can now inform the receiver that its view's tracking scroll view has changed through the flexibleHeaderView:didChangeTrackingScrollViewAnimated: API. Example:

Swift

class MyAnimationDelegate: NSObject, MDCFlexibleHeaderViewAnimationDelegate {
	func flexibleHeaderView(_ flexibleHeaderView: MDCFlexibleHeaderView,
                          didChangeTrackingScrollViewAnimated animated: Bool) {
  if animated {
    // ...
  }
}

Objective-C

-(BOOL)flexibleHeaderView:(MDCFlexibleHeaderView *)flexibleHeaderView 
	didChangeTrackingScrollViewAnimated:(BOOL)animated {
  if (animated) {
    // ...
  }
}

Additionally, you can now animate your own changes alongside the default animations of the flexible header, by passing an animation sequence and a completion block to animateWithAnimations:completion:. Example:

Swift

myHeaderView.animate(animations: {
  scrollView.contentOffset = CGPoint(x: 0, y: -100)
  myHeaderView.maximumHeight = 100
})

Objective-C

[myHeaderView animate:^{
  scrollView.contentOffset = CGPointMake(0, -100.f);
  myHeaderView.maximumHeight = 100.f;
}];

Component changes

ActionSheet

Banner

FlexibleHeader

Ripple

Snackbar

TextFields

v94.0.0

08 Nov 18:30
Compare
Choose a tag to compare

This major release adds a new configuration block to MDCSnackBarMessage and moves the currently in development MDCTextControl based TextFields from the TextFields component directory to their own TextControls directory. While there are no API changes associated with this move, it does have the potential to break anyone importing these textfields from their old location, hence the major version bump.

New features

MDCSnackBarMessage now provides a block that is called before the message is presented. This allows clients to perform last minute configurations.

Objective-C

MDCSnackbarMessage *message = [[MDCSnackbarMessage alloc] init];
message.snackbarMessageWillPresentBlock =
  ^(MDCSnackbarMessage *snackbarMessage, MDCSnackbarMessageView *messageView) {
      // Configure snackbar message.
    };
[MDCSnackbarManager showMessage:message];

Swift

let message = MDCSnackbarMessage()
message.snackbarMessageWillPresentBlock = { snackbarMessage, messageView in
  // Configure snackbar message.
}
MDCSnackbarManager.showMessage(message)

Component changes

TextControls

Snackbar


v93.5.0

07 Nov 16:43
Compare
Choose a tag to compare

This minor release introduces new APIs for Slider. The track height and the
visibility of track tick marks can be customized.

New features

MDCSlider allows customization of the track height.

Objective-C

MDCSlider *slider = [[MDCSlider alloc] init];
slider.trackHeight = 4;

Swift

let slider = MDCSlider()
slider.trackHeight = 4

MDCSlider also allows controlling the display of the track tick marks for
continuous and discrete sliders. Setting this property disables the automatic
conversion of a slider to "discrete" when setting numberOfDiscreteValues.

Objective-C

MDCSlider *slider = [[MDCSlider alloc] init];
// Track tick marks are always shown. Remains a continuous slider.
slider.trackTickVisibility = MDCSliderTrackTickVisibilityAlways;
slider.minimumValue = 0;
slider.maximumValue = 100;
// Show tick marks at 0, 10, 20, ..., 100
slider.numberOfDiscreteValues = 11;

Swift

let slider = MDCSlider()
// Track tick marks are always shown. Remains a continuous slider.
slider.trackTickVisibility = .always
slider.minimumValue = 0;
slider.maximumValue = 100;
// Show tick marks at 0, 10, 20, ..., 100
slider.numberOfDiscreteValues = 11;

Component changes

ThumbTrack

Multi-component changes

v93.4.0

07 Nov 00:17
Compare
Choose a tag to compare

93.4.0

This minor release adds a new Filled and Outlined TextFields that will eventually replace MDCTextField's filled and outlined controllers. Additionally, it fixes dynamic type issues for multiple components, and removes deprecated themers.

New features

TextFields

Component changes

ActivityIndicator

Dialogs

TextFields

FlexibleHeader

Slider

ThumbTrack

Multi-component changes