Material Components v94.1.0 Release Notes
Release Date: 2019-11-13 // over 4 years ago-
๐ 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)