v81.0.0
This major release introduces the Ripple component and integrates it with Cards. There are also
visual changes for badges on Tabs, multi-line title support for Bottom Navigation, and improved
Dynamic Type support for Buttons and Feature Highlight.
Breaking changes
The appearance of badges on MDCTabBar has changed. Badges now appear similar to those on
MDCBottomNavigationBar and are, by default, a red "pill" shape with white text. The color can be
customized by assigning a value to - UITabBarItem.badgeColor.
New features
Ripple integration with Cards
Cards now support the latest iteration of the Material Design "ripple" effect. Clients can test this
functionality by setting enableRippleBehavior to YES.
Swift
myCard.enableRippleBehavior = trueObjective-C
self.myCard.enableRippleBehavior = YES;Multi-line title support in Bottom Navigation
Clients can enable multi-line title support in MDCBottomNavigationBar by setting
titlesNumberOfLines to a value other than 1. This API should be used only as a last resort, when
it is not possible to provide shorter titles that fit within the available screen space.
Swift
bottomNavigationBar.titlesNumberOfLines = 0Objective-C
self.bottomNavigationBar.titlesNumberOfLines = 0;Automatic Dynamic Type font adjustment in Feature Highlight and Buttons
Buttons and Feature Highlight now support enabling automatic font size adjustment for Dynamic Type
when the fonts used by the components have scaling curves attached using MDCFontScaler. Both
components use the new scaling if mdc_adjustsFontForContentSizeCategory is set to YES.
Swift
// The new TypographyScheme defaults provide scaled fonts
containerScheme.typographyScheme = MDCTypographyScheme.init(defaults: .material201902)
let button = MDCButton()
button.applyContainedTheme(withScheme: containerScheme)
button.setTitle("Submit", for: UIControlState())
// Enable automatic font adjustment
button.mdc_adjustsFontForContentSizeCategory = trueObjective-C
// The new TypographyScheme defaults provide scaled fonts
self.containerScheme.typographyScheme =
[[MDCTypographyScheme alloc] initWithDefaults: MDCTypographySchemeDefaultsMaterial201804];
MDCButton *button = [[MDCButton alloc] init];
[button applyContainedThemeWithScheme:self.containerScheme];
[button setTitle:@"Submit" forState:UIControlStateNormal];
// Enable automatic font adjustment
button.mdc_adjustsFontForContentSizeCategory = YES;API changes
Banner
MDCBannerView
new property: textLabel in MDCBannerView
new property: imageView in MDCBannerView
new property: leadingButton in MDCBannerView
new property: trailingButton in MDCBannerView
removed property: buttons in MDCBannerView
removed property: text in MDCBannerView
removed property: image in MDCBannerView
removed property: numberOfButtons in MDCBannerView
modified class: MDCBannerView
| Type of change: | Declaration |
|---|---|
| From: | @interface MDCBannerView : UIView @property(nonatomic, copy, nonnull) NSString *text; @property(nonatomic, strong, nullable) UIImage *image; // default is nil @property(nonatomic, assign) NSUInteger numberOfButtons; // default is 1 /** The buttons representing the banner's actions. */ @property(nonatomic, readonly, copy, nonnull) NSArray<MDCButton *> *buttons; @end |
| To: | @interface MDCBannerView : UIView /** A view that displays the text on a @c MDCBannerView The properties of @c textLabel can be used to configure the text shown on @c MDCBannerView. */ @property(nonatomic, readonly, strong, nonnull) UILabel *textLabel; /** A view that displays the image on a @c MDCBannerView. The properties of @c imageView can be used to configure the image shown on @c MDCBannerView. If @c imageView 's own property @c image is @c nil, this view won't show on the @c MDCBannerView. */ @property(nonatomic, readonly, strong, nonnull) UIImageView *imageView; /** A leading button that displays on a @c MDCBannerView. This @c leadingButton is displayed on the leading edge of the view. If it does not fit on the same row as @c trailingButton, it will be placed above @c trailingButton. */ @property(nonatomic, readonly, strong, nonnull) MDCButton *leadingButton; /**s A trailing button that displays on a @c MDCBannerView. This @c trailingButton is displayed on the trailing edge of the view. If it does not fit on the same row as @c leadingButton, it will be placed shows below @c leadingButton. */ @property(nonatomic, readonly, strong, nonnull) MDCButton *trailingButton; @end |
BottomNavigation
MDCBottomNavigationBar
new property: titlesNumberOfLines in MDCBottomNavigationBar
Buttons
MDCButton
new property: mdc_legacyFontScaling in MDCButton
Cards
MDCCardCollectionCell
new property: rippleView in MDCCardCollectionCell
new property: dragged in MDCCardCollectionCell
new property: enableRippleBehavior in MDCCardCollectionCell
modified class: MDCCardCollectionCell
| Type of change: | Declaration |
|---|---|
| From: | @interface MDCCardCollectionCell : UICollectionViewCell /** When selectable is set to YES, a tap on a cell will trigger a visual change between selected and unselected. When it is set to NO, a tap will trigger a normal tap (rather than trigger different visual selection states on the card). Default is set to NO. */ @property(nonatomic, assign, getter=isSelectable) BOOL selectable; /** The corner radius for the card Default is set to 4. */ @property(nonatomic, assign) CGFloat cornerRadius UI_APPEARANCE_SELECTOR; /** The inkView for the card that is initiated on tap */ @property(nonatomic, readonly, strong, nonnull) MDCInkView *inkView; /** This property defines if a card as a whole should be interactable or not. What this means is that when isInteractable is set to NO, there will be no ink ripple and no change in shadow elevation when tapped or selected. Also the card container itself will not be tappable, but any of its subviews will still be tappable. Default is set to YES. Important: Our specification for cards explicitly define a card as being an interactable component. Therefore, this 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. */ @property(nonatomic, getter=isInteractable) IBInspectable BOOL interactable; /* The shape generator used to define the card cell's shape. When set, layer properties such as cornerRadius and other layer properties are nullified/zeroed. If a layer property is explicitly set after the shapeGenerator has been set, it will lead to unexpected behavior. When the shapeGenerator is nil, MDCCardCollectionCell will use the default underlying layer with its default settings. Default value for shapeGenerator is nil. */ @property(nullable, nonatomic, strong) id<MDCShapeGenerating> shapeGenerator; /** Sets the shadow elevation for an MDCCardViewState state @param shadowElevation The shadow elevation @param state MDCCardCellState the card state */ - (void)setShadowElevation:(MDCShadowElevation)shadowElevation forState:(MDCCardCellState)state UI_APPEARANCE_SELECTOR; /** Returns the shadow elevation for an MDCCardViewState state If no elevation has been set for a state, the value for MDCCardCellStateNormal will be returned. Default value for MDCCardCellStateNormal is 1 Default value for MDCCardCellStateHighlighted is 8 Default value for MDCCardCellStateSelected is 8 @param state MDCCardCellStateNormal the card state @return The shadow elevation for the requested state. */ - (MDCShadowElevation)shadowElevationForState:(MDCCardCellState)state UI_APPEARANCE_SELECTOR; /** Sets the border width for an MDCCardViewState state @param borderWidth The border width @param state MDCCardCellState the card state */ - (void)setBorderWidth:(CGFloat)borderWidth forState:(MDCCardCellState)state UI_APPEARANCE_SELECTOR; /** Returns the border width for an MDCCardCellState state If no border width has been set for a state, the value for MDCCardCellStateNormal will be returned. Default value for MDCCardCellStateNormal is 0 @param state MDCCardCellState the card state @return The border width for the requested state. */ - (CGFloat)borderWidthForState:(MDCCardCellState)state UI_APPEARANCE_SELECTOR; /** Sets the border color for an MDCCardCellStateNormal state @param borderColor The border color @param state MDCCardCellState the card state */ - (void)setBorderColor:(nullable UIColor *)borderColor forState:(MDCCardCellState)state UI_APPEARANCE_SELECTOR; /** Returns the border color for an MDCCardCellStateNormal state If no border color has been set for a state, it will check the value of UIControlStateNormal. If that value also isn't set, then nil will be returned. @param state MDCCardCellState the card state @return The border color for the requested state. */ - (nullable UIColor *)borderColorForState:(MDCCardCellState)state UI_APPEARANCE_SELECTOR; /** Sets the shadow color for an MDCCardCellStateNormal state @param shadowColor The shadow color @param state MDCCardCellState the card state */ - (void)setShadowColor:(nullable UIColor *)shadowColor forState:(MDCCardCellState)state UI_APPEARANCE_SELECTOR; /** Returns the shadow color for an MDCCardCellStateNormal state If no color has been set for a state, the value for MDCCardViewStateNormal will be returned. Default value for MDCCardCellStateNormal is blackColor @param state MDCCardCellState the card state @return The shadow color for the requested state. */ - (nullable UIColor *)shadowColorForState:(MDCCardCellState)state UI_APPEARANCE_SELECTOR; /** Returns the image for an MDCCardCellStateNormal state. @note The image is only displayed when selectableis YES. If no image has been set for a state, it will check the value of UIControlStateNormal. If that value also isn't set, then nil will be returned. Default value for MDCCardCellStateSelected is ic_check_circle @param state MDCCardCellState the card state @return The image for the requested state. */ - (nullable UIImage *)imageForState:(MDCCardCellState)state UI_APPEARANCE_SELECTOR; /** Sets the image for an MDCCardCellStateNormal state @note The image is only displayed whenselectableis YES. @param image The image @param state MDCCardCellState the card state */ - (void)setImage:(nullable UIImage *)image forState:(MDCCardCellState)state UI_APPEARANCE_SELECTOR; /** Returns the horizontal image alignment for an MDCCardCellStateNormal state @note The image is only displayed whenselectableis YES. If no alignment has been set for a state, it will check the value of UIControlStateNormal. If that value also isn't set, then MDCCardCellImageHorizontalAlignmentRight will be returned. @param state MDCCardCellState the card state @return The horizontal alignment for the requested state. */ - (MDCCardCellHorizontalImageAlignment)horizontalImageAlignmentForState:(MDCCardCellState)state UI_APPEARANCE_SELECTOR; /** Sets the image alignment for an MDCCardCellStateNormal state @note The image is only displayed whenselectableis YES. @param horizontalImageAlignment The image alignment @param state MDCCardCellState the card state */ - (void)setHorizontalImageAlignment:(MDCCardCellHorizontalImageAlignment)horizontalImageAlignment forState:(MDCCardCellState)state UI_APPEARANCE_SELECTOR; /** Returns the vertical image alignment for an MDCCardCellStateNormal state @note The image is only displayed whenselectableis YES. If no alignment has been set for a state, it will check the value of UIControlStateNormal. If that value also isn't set, then MDCCardCellImageVerticalAlignmentTop will be returned. @param state MDCCardCellState the card state @return The vertical alignment for the requested state. */ - (MDCCardCellVerticalImageAlignment)verticalImageAlignmentForState:(MDCCardCellState)state UI_APPEARANCE_SELECTOR; /** Sets the image alignment for an MDCCardCellStateNormal state @note The image is only displayed whenselectableis YES. @param verticalImageAlignment The image alignment @param state MDCCardCellState the card state */ - (void)setVerticalImageAlignment:(MDCCardCellVerticalImageAlignment)verticalImageAlignment forState:(MDCCardCellState)state UI_APPEARANCE_SELECTOR; /** Returns the image tint color for an MDCCardCellStateNormal state @note The image is only displayed whenselectableis YES. If no tint color has been set for a state, it will check the value of UIControlStateNormal. If that value also isn't set, then nil will be returned. @param state MDCCardCellState the card state @return The image tint color for the requested state. */ - (nullable UIColor *)imageTintColorForState:(MDCCardCellState)state UI_APPEARANCE_SELECTOR; /** Sets the image tint color for an MDCCardCellStateNormal state @note The image is only displayed whenselectable is YES. @param imageTintColor The image tint color @param state MDCCardCellState the card state */ - (void)setImageTintColor:(nullable UIColor *)imageTintColor forState:(MDCCardCellState)state UI_APPEARANCE_SELECTOR; /** The state of the card cell. Default is MDCCardCellStateNormal. */ @property(nonatomic, readonly) MDCCardCellState state; @end |
| To: | @interface MDCCardCollectionCell : UICollectionViewCell /** When selectable is set to YES, a tap on a cell will trigger a visual change between selected and unselected. When it is set to NO, a tap will trigger a normal tap (rather than trigger different visual selection states on the card). Default is set to NO. */ @property(nonatomic, assign, getter=isSelectable) BOOL selectable; /** A Boolean value indicating whether the card is in the dragged state. */ @property(nonatomic, getter=isDragged) BOOL dragged; /** The corner radius for the card Default is set to 4. */ @property(nonatomic, assign) CGFloat cornerRadius UI_APPEARANCE_SELECTOR; /** The inkView for the card that is initiated on tap */ @property(nonatomic, readonly, strong, nonnull) MDCInkView *inkView; /** The rippleView for the card that is initiated on tap. The ripple view is the successor of ink view, and can be used by setting enableRippleBehaviorto YES after initializing the card. */ @property(nonatomic, readonly, strong, nonnull) MDCStatefulRippleView *rippleView; /** This property defines if a card as a whole should be interactable or not. What this means is that when isInteractable is set to NO, there will be no ink ripple and no change in shadow elevation when tapped or selected. Also the card container itself will not be tappable, but any of its subviews will still be tappable. Default is set to YES. Important: Our specification for cards explicitly define a card as being an interactable component. Therefore, this 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. */ @property(nonatomic, getter=isInteractable) IBInspectable BOOL interactable; /* The shape generator used to define the card cell's shape. When set, layer properties such as cornerRadius and other layer properties are nullified/zeroed. If a layer property is explicitly set after the shapeGenerator has been set, it will lead to unexpected behavior. When the shapeGenerator is nil, MDCCardCollectionCell will use the default underlying layer with its default settings. Default value for shapeGenerator is nil. */ @property(nullable, nonatomic, strong) id<MDCShapeGenerating> shapeGenerator; /** By setting this property to YES, you will enable and use inkView's successor rippleView as the main view to provide visual feedback for taps. It is recommended to set this property right after initializing the card. Defaults to NO. */ @property(nonatomic, assign) BOOL enableRippleBehavior; /** Sets the shadow elevation for an MDCCardViewState state @param shadowElevation The shadow elevation @param state MDCCardCellState the card state */ - (void)setShadowElevation:(MDCShadowElevation)shadowElevation forState:(MDCCardCellState)state UI_APPEARANCE_SELECTOR; /** Returns the shadow elevation for an MDCCardViewState state If no elevation has been set for a state, the value for MDCCardCellStateNormal will be returned. Default value for MDCCardCellStateNormal is 1 Default value for MDCCardCellStateHighlighted is 8 Default value for MDCCardCellStateSelected is 8 @param state MDCCardCellStateNormal the card state @return The shadow elevation for the requested state. */ - (MDCShadowElevation)shadowElevationForState:(MDCCardCellState)state UI_APPEARANCE_SELECTOR; /** Sets the border width for an MDCCardViewState state @param borderWidth The border width @param state MDCCardCellState the card state */ - (void)setBorderWidth:(CGFloat)borderWidth forState:(MDCCardCellState)state UI_APPEARANCE_SELECTOR; /** Returns the border width for an MDCCardCellState state If no border width has been set for a state, the value for MDCCardCellStateNormal will be returned. Default value for MDCCardCellStateNormal is 0 @param state MDCCardCellState the card state @return The border width for the requested state. */ - (CGFloat)borderWidthForState:(MDCCardCellState)state UI_APPEARANCE_SELECTOR; /** Sets the border color for an MDCCardCellStateNormal state @param borderColor The border color @param state MDCCardCellState the card state */ - (void)setBorderColor:(nullable UIColor *)borderColor forState:(MDCCardCellState)state UI_APPEARANCE_SELECTOR; /** Returns the border color for an MDCCardCellStateNormal state If no border color has been set for a state, it will check the value of UIControlStateNormal. If that value also isn't set, then nil will be returned. @param state MDCCardCellState the card state @return The border color for the requested state. */ - (nullable UIColor *)borderColorForState:(MDCCardCellState)state UI_APPEARANCE_SELECTOR; /** Sets the shadow color for an MDCCardCellStateNormal state @param shadowColor The shadow color @param state MDCCardCellState the card state */ - (void)setShadowColor:(nullable UIColor *)shadowColor forState:(MDCCardCellState)state UI_APPEARANCE_SELECTOR; /** Returns the shadow color for an MDCCardCellStateNormal state If no color has been set for a state, the value for MDCCardViewStateNormal will be returned. Default value for MDCCardCellStateNormal is blackColor @param state MDCCardCellState the card state @return The shadow color for the requested state. */ - (nullable UIColor *)shadowColorForState:(MDCCardCellState)state UI_APPEARANCE_SELECTOR; /** Returns the image for an MDCCardCellStateNormal state. @note The image is only displayed whenselectableis YES. If no image has been set for a state, it will check the value of UIControlStateNormal. If that value also isn't set, then nil will be returned. Default value for MDCCardCellStateSelected is ic_check_circle @param state MDCCardCellState the card state @return The image for the requested state. */ - (nullable UIImage *)imageForState:(MDCCardCellState)state UI_APPEARANCE_SELECTOR; /** Sets the image for an MDCCardCellStateNormal state @note The image is only displayed whenselectableis YES. @param image The image @param state MDCCardCellState the card state */ - (void)setImage:(nullable UIImage *)image forState:(MDCCardCellState)state UI_APPEARANCE_SELECTOR; /** Returns the horizontal image alignment for an MDCCardCellStateNormal state @note The image is only displayed whenselectableis YES. If no alignment has been set for a state, it will check the value of UIControlStateNormal. If that value also isn't set, then MDCCardCellImageHorizontalAlignmentRight will be returned. @param state MDCCardCellState the card state @return The horizontal alignment for the requested state. */ - (MDCCardCellHorizontalImageAlignment)horizontalImageAlignmentForState:(MDCCardCellState)state UI_APPEARANCE_SELECTOR; /** Sets the image alignment for an MDCCardCellStateNormal state @note The image is only displayed whenselectableis YES. @param horizontalImageAlignment The image alignment @param state MDCCardCellState the card state */ - (void)setHorizontalImageAlignment:(MDCCardCellHorizontalImageAlignment)horizontalImageAlignment forState:(MDCCardCellState)state UI_APPEARANCE_SELECTOR; /** Returns the vertical image alignment for an MDCCardCellStateNormal state @note The image is only displayed whenselectableis YES. If no alignment has been set for a state, it will check the value of UIControlStateNormal. If that value also isn't set, then MDCCardCellImageVerticalAlignmentTop will be returned. @param state MDCCardCellState the card state @return The vertical alignment for the requested state. */ - (MDCCardCellVerticalImageAlignment)verticalImageAlignmentForState:(MDCCardCellState)state UI_APPEARANCE_SELECTOR; /** Sets the image alignment for an MDCCardCellStateNormal state @note The image is only displayed whenselectableis YES. @param verticalImageAlignment The image alignment @param state MDCCardCellState the card state */ - (void)setVerticalImageAlignment:(MDCCardCellVerticalImageAlignment)verticalImageAlignment forState:(MDCCardCellState)state UI_APPEARANCE_SELECTOR; /** Returns the image tint color for an MDCCardCellStateNormal state @note The image is only displayed whenselectableis YES. If no tint color has been set for a state, it will check the value of UIControlStateNormal. If that value also isn't set, then nil will be returned. @param state MDCCardCellState the card state @return The image tint color for the requested state. */ - (nullable UIColor *)imageTintColorForState:(MDCCardCellState)state UI_APPEARANCE_SELECTOR; /** Sets the image tint color for an MDCCardCellStateNormal state @note The image is only displayed whenselectable is YES. @param imageTintColor The image tint color @param state MDCCardCellState the card state */ - (void)setImageTintColor:(nullable UIColor *)imageTintColor forState:(MDCCardCellState)state UI_APPEARANCE_SELECTOR; /** The state of the card cell. Default is MDCCardCellStateNormal. */ @property(nonatomic, readonly) MDCCardCellState state; @end |
MDCCard
new property: rippleView in MDCCard
new property: enableRippleBehavior in MDCCard
modified class: MDCCard
| Type of change: | Declaration |
|---|---|
| From: | @interface MDCCard : UIControl /** The corner radius for the card Default is set to 4. */ @property(nonatomic, assign) CGFloat cornerRadius UI_APPEARANCE_SELECTOR; /** The inkView for the card that is initiated on tap */ @property(nonatomic, readonly, strong, nonnull) MDCInkView *inkView; /** This property defines if a card as a whole should be interactable or not. What this means is that when isInteractable is set to NO, there will be no ink ripple and no change in shadow elevation when tapped or selected. Also the card container itself will not be tappable, but any of its subviews will still be tappable. Default is set to YES. Important: Our specification for cards explicitly define a card as being an interactable component. Therefore, this 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. */ @property(nonatomic, getter=isInteractable) IBInspectable BOOL interactable; /** Sets the shadow elevation for an UIControlState state @param shadowElevation The shadow elevation @param state UIControlState the card state */ - (void)setShadowElevation:(MDCShadowElevation)shadowElevation forState:(UIControlState)state UI_APPEARANCE_SELECTOR; /** Returns the shadow elevation for an UIControlState state If no elevation has been set for a state, the value for UIControlStateNormal will be returned. Default value for UIControlStateNormal is 1 Default value for UIControlStateHighlighted is 8 @param state UIControlState the card state @return The shadow elevation for the requested state. */ - (MDCShadowElevation)shadowElevationForState:(UIControlState)state UI_APPEARANCE_SELECTOR; /** Sets the border width for an UIControlState state @param borderWidth The border width @param state UIControlState the card state */ - (void)setBorderWidth:(CGFloat)borderWidth forState:(UIControlState)state UI_APPEARANCE_SELECTOR; /** Returns the border width for an UIControlState state If no border width has been set for a state, the value for UIControlStateNormal will be returned. Default value for UIControlStateNormal is 0 @param state UIControlState the card state @return The border width for the requested state. */ - (CGFloat)borderWidthForState:(UIControlState)state UI_APPEARANCE_SELECTOR; /** Sets the border color for an UIControlState state @param borderColor The border color @param state UIControlState the card state */ - (void)setBorderColor:(nullable UIColor *)borderColor forState:(UIControlState)state UI_APPEARANCE_SELECTOR; /** Returns the border color for an UIControlState state If no border color has been set for a state, it will check the value of UIControlStateNormal. If that value also isn't set, then nil will be returned. @param state UIControlState the card state @return The border color for the requested state. */ - (nullable UIColor *)borderColorForState:(UIControlState)state UI_APPEARANCE_SELECTOR; /** Sets the shadow color for an UIControlState state @param shadowColor The shadow color @param state UIControlState the card state */ - (void)setShadowColor:(nullable UIColor *)shadowColor forState:(UIControlState)state UI_APPEARANCE_SELECTOR; /** Returns the shadow color for an UIControlState state If no color has been set for a state, the value for MDCCardViewStateNormal will be returned. Default value for UIControlStateNormal is blackColor @param state UIControlState the card state @return The shadow color for the requested state. */ - (nullable UIColor *)shadowColorForState:(UIControlState)state UI_APPEARANCE_SELECTOR; /* The shape generator used to define the card's shape. When set, layer properties such as cornerRadius and other layer properties are nullified/zeroed. If a layer property is explicitly set after the shapeGenerator has been set, it will lead to unexpected behavior. When the shapeGenerator is nil, MDCCard will use the default underlying layer with its default settings. Default value for shapeGenerator is nil. */ @property(nullable, nonatomic, strong) id<MDCShapeGenerating> shapeGenerator; @end |
| To: | @interface MDCCard : UIControl /** The corner radius for the card Default is set to 4. */ @property(nonatomic, assign) CGFloat cornerRadius UI_APPEARANCE_SELECTOR; /** The inkView for the card that is initiated on tap */ @property(nonatomic, readonly, strong, nonnull) MDCInkView *inkView; /** The rippleView for the card that is initiated on tap. The ripple view is the successor of ink view, and can be used by setting enableRippleBehavior to YES after initializing the card. */ @property(nonatomic, readonly, strong, nonnull) MDCStatefulRippleView *rippleView; /** This property defines if a card as a whole should be interactable or not. What this means is that when isInteractable is set to NO, there will be no ink ripple and no change in shadow elevation when tapped or selected. Also the card container itself will not be tappable, but any of its subviews will still be tappable. Default is set to YES. Important: Our specification for cards explicitly define a card as being an interactable component. Therefore, this 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. */ @property(nonatomic, getter=isInteractable) IBInspectable BOOL interactable; /** By setting this property to YES, you will enable and use inkView's successor rippleView as the main view to provide visual feedback for taps. It is recommended to set this property right after initializing the card. Defaults to NO. */ @property(nonatomic, assign) BOOL enableRippleBehavior; /** Sets the shadow elevation for an UIControlState state @param shadowElevation The shadow elevation @param state UIControlState the card state */ - (void)setShadowElevation:(MDCShadowElevation)shadowElevation forState:(UIControlState)state UI_APPEARANCE_SELECTOR; /** Returns the shadow elevation for an UIControlState state If no elevation has been set for a state, the value for UIControlStateNormal will be returned. Default value for UIControlStateNormal is 1 Default value for UIControlStateHighlighted is 8 @param state UIControlState the card state @return The shadow elevation for the requested state. */ - (MDCShadowElevation)shadowElevationForState:(UIControlState)state UI_APPEARANCE_SELECTOR; /** Sets the border width for an UIControlState state @param borderWidth The border width @param state UIControlState the card state */ - (void)setBorderWidth:(CGFloat)borderWidth forState:(UIControlState)state UI_APPEARANCE_SELECTOR; /** Returns the border width for an UIControlState state If no border width has been set for a state, the value for UIControlStateNormal will be returned. Default value for UIControlStateNormal is 0 @param state UIControlState the card state @return The border width for the requested state. */ - (CGFloat)borderWidthForState:(UIControlState)state UI_APPEARANCE_SELECTOR; /** Sets the border color for an UIControlState state @param borderColor The border color @param state UIControlState the card state */ - (void)setBorderColor:(nullable UIColor *)borderColor forState:(UIControlState)state UI_APPEARANCE_SELECTOR; /** Returns the border color for an UIControlState state If no border color has been set for a state, it will check the value of UIControlStateNormal. If that value also isn't set, then nil will be returned. @param state UIControlState the card state @return The border color for the requested state. */ - (nullable UIColor *)borderColorForState:(UIControlState)state UI_APPEARANCE_SELECTOR; /** Sets the shadow color for an UIControlState state @param shadowColor The shadow color @param state UIControlState the card state */ - (void)setShadowColor:(nullable UIColor *)shadowColor forState:(UIControlState)state UI_APPEARANCE_SELECTOR; /** Returns the shadow color for an UIControlState state If no color has been set for a state, the value for MDCCardViewStateNormal will be returned. Default value for UIControlStateNormal is blackColor @param state UIControlState the card state @return The shadow color for the requested state. */ - (nullable UIColor *)shadowColorForState:(UIControlState)state UI_APPEARANCE_SELECTOR; /* The shape generator used to define the card's shape. When set, layer properties such as cornerRadius and other layer properties are nullified/zeroed. If a layer property is explicitly set after the shapeGenerator has been set, it will lead to unexpected behavior. When the shapeGenerator is nil, MDCCard will use the default underlying layer with its default settings. Default value for shapeGenerator is nil. */ @property(nullable, nonatomic, strong) id<MDCShapeGenerating> shapeGenerator; @end |
FeatureHighlight
MDCFeatureHighlightView
new property: mdc_legacyFontScaling in MDCFeatureHighlightView
modified class: MDCFeatureHighlightView
| Type of change: | Declaration |
|---|---|
| From: | @interface MDCFeatureHighlightView : UIView @property(nonatomic, strong, nullable) UIColor *innerHighlightColor UI_APPEARANCE_SELECTOR; @property(nonatomic, strong, nullable) UIColor *outerHighlightColor UI_APPEARANCE_SELECTOR; @property(nonatomic, strong, nullable) UIFont *titleFont UI_APPEARANCE_SELECTOR; @property(nonatomic, strong, nullable) UIColor *titleColor UI_APPEARANCE_SELECTOR; @property(nonatomic, strong, nullable) UIFont *bodyFont UI_APPEARANCE_SELECTOR; @property(nonatomic, strong, nullable) UIColor *bodyColor UI_APPEARANCE_SELECTOR; /* Indicates whether the view's contents should automatically update their font when the device’s UIContentSizeCategory changes. This property is modeled after the adjustsFontForContentSizeCategory property in the UIContentSizeCategoryAdjusting protocol added by Apple in iOS 10.0. Default value is NO. */ @property(nonatomic, readwrite, setter=mdc_setAdjustsFontForContentSizeCategory:) BOOL mdc_adjustsFontForContentSizeCategory UI_APPEARANCE_SELECTOR; @end |
| To: | @interface MDCFeatureHighlightView : UIView @property(nonatomic, strong, nullable) UIColor *innerHighlightColor UI_APPEARANCE_SELECTOR; @property(nonatomic, strong, nullable) UIColor *outerHighlightColor UI_APPEARANCE_SELECTOR; @property(nonatomic, strong, nullable) UIFont *titleFont UI_APPEARANCE_SELECTOR; @property(nonatomic, strong, nullable) UIColor *titleColor UI_APPEARANCE_SELECTOR; @property(nonatomic, strong, nullable) UIFont *bodyFont UI_APPEARANCE_SELECTOR; @property(nonatomic, strong, nullable) UIColor *bodyColor UI_APPEARANCE_SELECTOR; /* Indicates whether the view's contents should automatically update their font when the device’s UIContentSizeCategory changes. This property is modeled after the adjustsFontForContentSizeCategory property in the UIContentSizeCategoryAdjusting protocol added by Apple in iOS 10.0. Default value is NO. */ @property(nonatomic, readwrite, setter=mdc_setAdjustsFontForContentSizeCategory:) BOOL mdc_adjustsFontForContentSizeCategory UI_APPEARANCE_SELECTOR; /** Enable legacy font scaling curves for Dynamic Type Default value is NO. */ @property(nonatomic, readwrite, setter=mdc_setLegacyFontScaling:) BOOL mdc_legacyFontScaling; @end |
MDCFeatureHighlightViewController
new property: mdc_legacyFontScaling in MDCFeatureHighlightViewController
Ripple
MDCRippleTouchController
new method: -addRippleToView: in MDCRippleTouchController
modified method: -init in MDCRippleTouchController
| Type of change: | key.always_unavailable |
|---|---|
| From: | 1 |
| To: | 0 |
MDCRippleTouchControllerDelegate
new method: -rippleTouchController:insertRippleView:intoView: in MDCRippleTouchControllerDelegate
Component changes
Changes
AppBar
BottomNavigation
- Add multi-line title support. (#6999) (Robert Moore)
- Extract common Snapshot consts. (#7004) (Robert Moore)
- Split snapshot tests. (#6997) (Robert Moore)
Buttons
- Don't make Buttons example launch screen. (#7016) (Robert Moore)
- New Dynamic Type curves (#7003) (ianegordon)
FeatureHighlight
- New Dynamic Type curves (#6947) (ianegordon)
Ripple
- Added additional unit and snapshot tests (#6992) (Yarden Eitan)
- Additional documentation for Ripple and its classes (#6996) (Yarden Eitan)
- Adds additional API of adding the Ripple to a view and its position in the view hierarchy. (#6983) (Yarden Eitan)
- Graduate Ripple to Ready. (#7000) (Yarden Eitan)
Tabs
- Add Badge view (#6980) (Robert Moore)
- Add badge snapshot tests. (#6978) (Robert Moore)
- Add badgeColor snapshot tests (#6990) (Robert Moore)