v100.0.0
100.0.0
In this major release we made a breaking change improvement to Ink’s inkColor
API. As well as improvements including customization Dialogs presentation animation,
Flexible Header behavior around safe area. Also, we addressed bugs in Snackbar and TextFields.
Breaking changes
The inkColor
in MDCInkView
is now null_resettable
.
New features
Dialogs
We added the ability to customize MDCAlertController presentation animation.
let alertController = MDCAlertController()
alertController.presentationOpacityAnimationDuration = 0.5
alertController.presentationScaleAnimationDuration = 0.25
alertController.presentationInitialScaleFactor = 0.7
MDCAlertController *alertController = [[MDCAlertController alloc] init];
alertController.presentationOpacityAnimationDuration = 0.5;
alertController.presentationScaleAnimationDuration = 0.25;
alertController.presentationInitialScaleFactor = 0.7;
FlexibleHeader
We added a new runtime flag permitInferringTopSafeAreaFromTopLayoutGuideViewController
to address a crash that was occurring in certain configurations.
When disabled, if both inferTopSafeAreaInsetFromViewController and topLayoutGuideAdjustmentEnabled are set to YES, and the view controller selected to extract the safe area inset from (either automatically or via the delegate) is the same as topLayoutGuideViewController, the app will crash.
When enabled, the app will not crash in the situation described above. This is only supported on iOS 11+.
Enable this property before setting inferTopSafeAreaInsetFromViewController or topLayoutGuideViewController.
let flexibleHeader = MDCFlexibleHeaderViewController()
flexibleHeader.permitInferringTopSafeAreaFromTopLayoutGuideViewController = true
MDCFlexibleHeaderViewController *flexibleHeader = [[MDCFlexibleHeaderViewController alloc] init];
flexibleHeader.permitInferringTopSafeAreaFromTopLayoutGuideViewController = YES;
API changes
Dialogs
new property: presentationOpacityAnimationDuration
in MDCAlertController
.
new property: presentationScaleAnimationDuration
in MDCAlertController
.
new property: presentationInitialScaleFactor
in MDCAlertController
.
FlexibleHeader
new property: permitInferringTopSafeAreaFromTopLayoutGuideViewController
in MDCFlexibleHeaderViewController
.
Ink
modified property: inkColor
in MDCInkView
to be null_resettable
.
Component changes
ActionSheet
- Standardize the examples. (#9334) (featherless)
Banner
- Update README.md (#9292) (Radek)
Dialogs
- Add
const
keyword to CGFloat and UIEdgeInsets constants in MDCDialogPresentationController. (#9325) (Randall Li) - Expose MDCAlertController presentation animation properties (#9314) (Bryan Oltman)
FlexibleHeader
- Add new flag to allow use of inferTopSafeAreaInsetFromViewController with topLayoutGuideAdjustmentEnabled (#9323) (featherless)
- Clean up unsupported situation when inferring the top safe area inset (#9317) (featherless)
Ink
- Update ink color to be null resettable. (#9253) (Yarden Eitan)
Snackbar
- Add snapshot test showing reported shadow bug (#9309) (Yarden Eitan)
- Resolve truncation of shadow in Snackbars (#9315) (Yarden Eitan)
Tabs
- Remove out of date color theming docs (#9330) (Andrew Overton)
TextControls
- Add swift storyboard example (#9328) (Andrew Overton)
TextFields
- Ensures that constraints used for the trailing view are properly removed when a new trailing view is set (#9336) (Andrew Overton)
- Removes requirement that the textView delegate be set when informing layout delegate of a size change (#9337) (Andrew Overton)