Releases: material-components/material-components-ios
v95.0.1
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
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
- Add unit test to test background color change when user interface changes. (#9073) (Wenyu Zhang)
- Implement UIAccessibilityContainer informal protocol to correct accessibility order. (#9116) (Wenyu Zhang)
- Post accessibility notification when Banner shows on the screen in examples. (#9111) (Wenyu Zhang)
BottomNavigation
- Deprecate MDCBottomNavigationBarColorThemer (#9126) (Bryan Oltman)
ButtonBar
- delete-MDCButtonBarTypographyThemer (#9117) (Andrew Overton)
Buttons
- Delete MDCButton cornerRadius (#9121) (Bryan Oltman)
- Deprecate MDCOutlinedButtonColorThemer (#9048) (Galia Kaufman)
- Deprecating MDCTextButtonColorThemer (#9049) (Galia Kaufman)
Cards
- Deprecate MDCCardsColorThemer (#9078) (Bryan Oltman)
Chips
- Move themer code to MDCChipView+MaterialTheming (#9110) (Bryan Oltman)
Ink
Tabs
- Deprecate MDCTabbarFontThemer (#9114) (Andrew Overton)
- Don't use MDCTabBarColorThemer in examples (#9125) (Andrew Overton)
TextFields
- Mark MDCTextFieldColorThemer as deprecated (#9076) (Bryan Oltman)
private/ThumbTrack
- deprecate-MDCThumbTrack-thumbMaxRippleRadius (#9120) (Andrew Overton)
Multi-component changes
- Delete Themers (#9028) (Bryan Oltman)
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)
v94.4.0
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
- Add
contentEdgeInsets
API. (#9008) (Robert Moore) - Align title/image to their leading edges directly. (#9013) (Robert Moore)
- Correct RTL snapshot tests. (#9011) (Robert Moore)
- Name unit tests to match class. (#9003) (Robert Moore)
- Refactor snapshot tests. (#8999) (Robert Moore)
- Split "insets" API snapshot tests to separate file. (#9020) (Robert Moore)
BottomSheet
Buttons
- Fix dynamic type example. (#8992) (Cody Weaver)
FeatureHighlight
- Fix accessibility tests. (#9018) (Robert Moore)
FlexibleHeader
- Add FlexibleHeaderShiftedOffscreenWithShiftBehaviorDisabledTests. (#9023) (featherless)
- Expose a shiftedOffscreen property. (#9014) (featherless)
ShadowElevations
TextControls
- Add Outlined theming extension (#9002) (Andrew Overton)
- Add MDCFilledTextField theming extension (#8993) (Andrew Overton)
v94.3.0
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
inMDCSnackbarManager
-
adjustsFontForContentSizeCategoryWhenScaledFontIsUnavailable
inMDCSnackbarMessageView
Component changes
ActionSheet
- Allow Swift example to support dynamic type (#8946) (Cody Weaver)
ActivityIndicator
- Add a voiceover layout change notification… (#8909) (Yarden Eitan)
AppBar
- AppBar example has low-contrast text (#8966) (Galia Kaufman)
- Make example titles more accurate. (#8828) (Robert Moore)
Banner
- Add a snapshot for banner with no action case. (#8968) (Wenyu Zhang)
- Fix Banner positioning in example for iOS 10 (#8829) (Bryan Oltman)
- Support use case where no button appears on Banner. (#8951) (Wenyu Zhang)
BottomNavigation
- Add accessibility value for badge (#8920) (Cody Weaver)
- Clean up badge value test example (#8921) (Cody Weaver)
BottomSheet
- Add VoiceOver support to BottomSheetShortCollectionExample (#8849) (Bryan Oltman)
- Add accessibility elements to BottomSheetExamples (#8923) (Bryan Oltman)
- Make bottom sheet be in extended state when voiceover is on (#8787) (Andrew Overton)
- Remove scrim accessibility logic from BottomSheetUIControlExample (#8848) (Bryan Oltman)
ButtonBar
- Darken ButtonBarIconExample icon colors (#8826) (Bryan Oltman)
- Delete the Theming extension. (#8696) (featherless)
Buttons
- Fix a11y issues in Buttons (Content Edge Insets) exam… (#8900) (Yarden Eitan)
- Improve accessibility of Shaped Buttons. (#8964) (Robert Moore)
- Update accessibility label for FABs (#8911) (Cody Weaver)
Cards
- Fix bug in the "Typical use" example where the image would not appear. (#8943) (featherless)
- Make the "Typical use" example title label an a11y heading. (#8945) (featherless)
- Make the Shaped Edit/Reorder example class/files match the name of the example. (#8899) (featherless)
- Make the shaped collection cell an accessibility button. (#8901) (featherless)
Chips
- Fix layout of ChipsSizingExampleViewController. (#8940) (featherless)
- Give the ChipsSizing example's sliders a11y labels and values. (#8942) (featherless)
- Set UIAccessibilityTraitButton on MDCChipView's accessibilityTraits. (#8792) (featherless)
Dialogs
- Allow clients to customize message accessibility label (#8801) (Cody Weaver)
- Allow clients to customize title accessibilityLabel. (#8799) (Cody Weaver)
- Fix bug in "Dismissing Dialogs" dialogs where the buttons were not themed. (#8967) (featherless)
- Implement the a11y escape gesture on all custom dialogs in the "Dismissing Dialogs" example. (#8965) (featherless)
- Make all "Dismissing Dialogs" cells a11y buttons. (#8956) (featherless)
- Make the "Dialogs with accessory view" example's cells accessibility buttons. (#8939) (featherless)
- Make the "View with corner radius" example's dialog escapable in VoiceOver. (#8950) (featherless)
- More Material Alerts examples is more accessible. (#8960) (Robert Moore)
- Provide accessibility traits for Input Field example (#8958) (Robert Moore)
- Remove usage of
buttonFont
in example (#8772) (Cody Weaver) - Set dialog message accessibilityFrame based on visible message text (#8786) (Bryan Oltman)
FeatureHighlight
- Add a voiceover dismissal affordance for the feature highlight. (#8959) (Yarden Eitan)
- Make "Color" example accessible. (#8957) (Robert Moore)
- Positions label not hidden behind nav bar. (#8969) (Yarden Eitan)
Ink
- Consolidate example code into a single file. (#8890) (featherless)
- Make the ink views accessibility elements. (#8891) (featherless)
List
- Fix MDCBaseCell Example to work with Voice Over (#8953) (Galia Kaufman)
- Fix accessibility labels and layout in CollectionListCellExampleTypicalUse (#8944) (Bryan Oltman)
- Fix catalog compile issue (#8974) (Cody Weaver)
- Make Base Cell example more accessible. (#8947) (Robert Moore)
- Make Base Cell example more accessible. (#8982) (Robert Moore)
NavigationDrawer
- Add close button to bottom drawer example header (#8963) (Bryan Oltman)
- [Remove container view when dismiss transitio… (#8660)]...
v94.2.0
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
- Add an example to show how Banner can be used as bottom bar in AppBar. (#8785) (Wenyu Zhang)
- Deactivate custom constraints when there is a need to update constraints.(#8793) (Wenyu Zhang)
- update constraint when frame is changed. (#8765) (Wenyu Zhang)
Slider
- Fix event handling. (#8759) (Robert Moore)
v94.1.0
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
- Fix crash in example (#8734) (Cody Weaver)
- Move layout code to
viewDidLayoutSubviews
(#8735) (Cody Weaver) - Use anchor-based constraints. (#8731) (Robert Moore)
Banner
- Use lastBaseLineAnchor to align buttons if they are on the same line. (#8752) (Wenyu Zhang)
- stop updating custom constraints before bound size is set. (#8749) (Wenyu Zhang)
FlexibleHeader
- Add a flexibleHeaderView:didChangeTrackingScrollViewAnimated: event to MDCFlexibleHeaderViewAnimationDelegate. (#8757) (featherless)
- Add an animateWithAnimations:completion: API. (#8739) (featherless)
Ripple
- Improve MDCRippleTouchController (#8631) (Michael Schneider)
Snackbar
- Update documentation on default. #8736 (Yarden Eitan)
TextFields
- Capture snapshots outside of view (#8718) (Andrew Overton
v94.0.0
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
- Move new TextFields into TextControls directory. (#8726) (Andrew Overton)
Snackbar
-
Fix MDCSnackbarMessage convenience class methods (#8746) (Yarden Eitan)
-
Fix MDCSnackbarMessage convenience class methods (#8751) (Yarden Eitan)
v93.5.0
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
- Discrete dots scale slowly with track height. (#8744) (Robert Moore)
Multi-component changes
- Add API to control showing tick marks. (#8743) (Robert Moore)
- Add trackHeight property (#8740) (Bryan Oltman)
- Continuous sliders show tick marks. (#8745) (Robert Moore)
v93.4.0
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
- Add filled textfields (#8674) (Andrew Overton)
- Add outlined textfield (#8705) (Andrew Overton)
Component changes
ActivityIndicator
- Delete MDCActivityIndicatorColorThemer. (#8694) (featherless)
Dialogs
- Title supports Dynamic Type. (#8691) (Robert Moore)
TextFields
- Add animation duration property to properly snapshot test MDCBaseTextField's subclasses (#8693) (Andrew Overton)
- Change base textfield floating label scale factor. (#8704) (Andrew Overton)
- Change label animation again (#8703) (Andrew Overton)
- Fix minor animation glitch when opening example (#8716) (Andrew Overton)
- Refactor label animation (#8700) (Andrew Overton)
- Refactor snapshots in preparation for more types of textfields (#8670) (Andrew Overton)
- Capture snapshots outside of view (#8718) (Andrew Overton)
- Add safety return to new multiline logic to make i… (#8695) (Yarden Eitan)
- Bring back original textInsets API for clients sub… (#8688) (Yarden Eitan)
FlexibleHeader
-
Add behavioral flag for animating shadow layer frames when tracking scroll view is changed (#8715) (featherless)
-
Expose an animation delegate on MDCFlexibleHeaderView. (#8712) (featherless)
-
Move all supplemental code into the examples. (#8690) (featherless)
Slider
ThumbTrack
- [ThumbTrack] Add Font API and Dynamic Type support (#8708) (Yarden Eitan)
Multi-component changes
- Deprecate the ShapeThemer extension. (#8697) (featherless)