v57.0.0
In this release we have added the List component, made accessibility improvements to Bottom Sheet, added Shapes support for Chips and Bottom Sheet, made Catalog visual improvements, and other bug fixes.
Breaking changes
TextFields
We have removed property backgroundColor from MDCTextInputControllerBase and properties backgroundColor and backgroundColorDefault from MDCTextInputController. The reason for removal was due to these properties not being used by the controller in any meaningful way, and therefore this should not produce any changes.
New features
BottomSheet
VoiceOver and switch device users currently have to use the accessibility escape gesture to dismiss a Bottom Sheet. Optionally, the BottomSheet can use
the dimmed "scrim" area (which can be tappable) to dismiss the bottom sheet using accessibility technologies.
As an example of how this could be used by clients, here's how our AppDelegate would change to support a VoiceOver button for dismissal:
let menuViewController = MDCMenuViewController(style: .plain)
let bottomSheet = MDCBottomSheetController(contentViewController: menuViewController)
bottomSheet.dismissOnBackgroundTap = true
bottomSheet.isScrimAccessibilityElement = true
bottomSheet.scrimAccessibilityLabel = "Close"
self.present(bottomSheet, animated: true, completion: nil)Cards
You can now set the car to be interactable or not. Our specification for cards explicitly define a card as being an interactable component.
Therefore, the interactable property should be set to NO only if there are other interactable items within the card's content, such as buttons or other tappable controls.
To set the interactability to no in your cards:
let card = MDCCard()
card.isInteractable = false
let cardCell = MDCCardCollectionCell()
cardCell.isInteractable = falseList
We now have a new component, List! See more information about the component here: https://github.com/material-components/material-components-ios/tree/develop/components/List
API changes
BottomSheet
MDCBottomSheetTransitionController(ScrimAccessibility)
new category: MDCBottomSheetTransitionController(ScrimAccessibility)
new property: isScrimAccessibilityElement in MDCBottomSheetTransitionController(ScrimAccessibility)
new property: scrimAccessibilityLabel in MDCBottomSheetTransitionController(ScrimAccessibility)
new property: scrimAccessibilityHint in MDCBottomSheetTransitionController(ScrimAccessibility)
new property: scrimAccessibilityTraits in MDCBottomSheetTransitionController(ScrimAccessibility)
MDCBottomSheetController
new property: scrimAccessibilityHint in MDCBottomSheetController
new property: isScrimAccessibilityElement in MDCBottomSheetController
new property: state in MDCBottomSheetController
new method: -shapeGeneratorForState: in MDCBottomSheetController
new property: scrimAccessibilityLabel in MDCBottomSheetController
new method: -setShapeGenerator:forState: in MDCBottomSheetController
new property: scrimAccessibilityTraits in MDCBottomSheetController
MDCSheetState
new enum: MDCSheetState with values MDCSheetStateExtended, MDCSheetStatePreferred, and MDCSheetStateClosed
MDCBottomSheetPresentationControllerDelegate
new method: -bottomSheetWillChangeState:sheetState: in MDCBottomSheetPresentationControllerDelegate
MDCBottomSheetPresentationController
new property: scrimAccessibilityLabel in MDCBottomSheetPresentationController
new property: isScrimAccessibilityElement in MDCBottomSheetPresentationController
new property: scrimAccessibilityTraits in MDCBottomSheetPresentationController
new property: scrimAccessibilityHint in MDCBottomSheetPresentationController
Cards
MDCCardCollectionCell
new property: interactable in MDCCardCollectionCell
MDCCard
new property: interactable in MDCCard
List
New component.
TextFields
MDCTextInputControllerFullWidth
new property: backgroundColor in MDCTextInputControllerFullWidth
new property: backgroundColorDefault in MDCTextInputControllerFullWidth
MDCTextInputControllerBase
removed property: backgroundColor in MDCTextInputControllerBase
MDCTextInputController
new property: textInputClearButtonTintColorDefault in MDCTextInputController
new property: textInputClearButtonTintColor in MDCTextInputController
removed property: backgroundColorDefault in MDCTextInputController
removed property: backgroundColor in MDCTextInputController
Typography
UIFont(MaterialSimpleEquality)
new method: -mdc_isSimplyEqual: in UIFont(MaterialSimpleEquality)
new category: UIFont(MaterialSimpleEquality)
Component changes
Tabs
Changes
- Fix alerts in examples (#4480) (Robert Moore)
FeatureHighlight
Changes
- Add swift example (#4439) (Cody Weaver)
Buttons
Changes
- [Catalog] Fix VoiceOver ordering in Buttons demo (#4482) (Robert Moore)
TextFields
Changes
- Fix clearIcon drawing (#4450) (Robert Moore)
- Make MDCTextField accessibilityValue include only placeholder or [super accessibilityValue], not both (#4460) (Andrew Overton)
- Migrate textInputClearButtonTintColor to MDCTextInputController, tests (#4465) (Michelle Dudley)
- Support clear button tint color (#4449) (Robert Moore)
- [Typography] 3rd PR on font equality (#4435) (Will Larche)
- {BreakingChange} Remove unused
backgroundColorproperty (#4452) (Robert Moore)
Chips
Changes
- Fix Choice demo (#4473) (Robert Moore)
- chips shape support fix + example (#4474) (Yarden Eitan)
Cards
Changes
- Added interactability toggle to Cards (#4404) (Yarden Eitan)
List
Changes
- [ListItems] Add Base Cell With Example (#4461) (Andrew Overton)
BottomSheet
Changes
- Dismiss BottomSheet with UIAccessibility (#4475) (Robert Moore)
- [Shapes] Added Shapes support for BottomSheet (#4486) (Yarden Eitan)
Typography
Changes
- 3rd PR on font equality (#4435) (Will Larche)
BottomNavigation
Changes
- AccessibilityValue and Selected icon support (#4444) (Cody Weaver)
- Test cases when we reset the bottom navigation items array (#4431) (Cody Weaver)
- [BottomNavigation, Math] Fix
BOOLtypes (#4436) (Robert Moore)
FlexibleHeader
Changes
- Fix odd scrolling bugs in voiceover (#4485) (John Detloff)