Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ran clang-format on the entire codebase #6027

Merged
merged 1 commit into from
Jan 11, 2019

Conversation

yarneo
Copy link
Contributor

@yarneo yarneo commented Dec 14, 2018

No description provided.

@material-automation
Copy link

This PR affects multiple components.

@"MaterialActivityIndicatorInProgressAccessibilityValue", // In Progress
@"MaterialActivityIndicatorAccessibilityLabel", // Activity Indicator
@"MaterialActivityIndicatorProgressHaltedAccessibilityValue", // Progress Halted
@"MaterialActivityIndicatorProgressCompletedAccessibilityValue", // %ld Percent Complete
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is 🔥

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yaaa! 😍

Copy link
Contributor

@jverkoey jverkoey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with the caveat that we cut a hotfix release with only this change.

@material-automation
Copy link

API diff detected the following changes

ActivityIndicator

MDCActivityIndicatorTransition

modified method: -initWithAnimation: in MDCActivityIndicatorTransition

Type of change: Declaration
From: - (nonnull instancetype)initWithAnimation: (_Nonnull MDCActivityIndicatorAnimation)animation NS_DESIGNATED_INITIALIZER;
To: - (nonnull instancetype)initWithAnimation:(_Nonnull MDCActivityIndicatorAnimation)animation NS_DESIGNATED_INITIALIZER;

AnimationTiming

UIView(MDCTimingFunction)

modified category: UIView(MDCTimingFunction)

Type of change: Declaration
From: @interface UIView (MDCTimingFunction) /** A convienence method for applying a timing function to animations. @param timingFunction A timing function for the easing curve animation. @param duration The time the animation takes. @param delay The time to wait before the animation begins. @param options Configuration options for the timing function. @param animations Animations to which the timing function will apply. @param completion A completion block fired after the animations complete. */ + (void)mdc_animateWithTimingFunction:(nullable CAMediaTimingFunction *)timingFunction duration:(NSTimeInterval)duration delay:(NSTimeInterval)delay options:(UIViewAnimationOptions)options animations:(void (^ __nonnull)(void))animations completion:(void (^ __nullable)(BOOL finished))completion; @end
To: @interface UIView (MDCTimingFunction) /** A convienence method for applying a timing function to animations. @param timingFunction A timing function for the easing curve animation. @param duration The time the animation takes. @param delay The time to wait before the animation begins. @param options Configuration options for the timing function. @param animations Animations to which the timing function will apply. @param completion A completion block fired after the animations complete. */ + (void)mdc_animateWithTimingFunction:(nullable CAMediaTimingFunction *)timingFunction duration:(NSTimeInterval)duration delay:(NSTimeInterval)delay options:(UIViewAnimationOptions)options animations:(void (^__nonnull)(void))animations completion:(void (^__nullable)(BOOL finished))completion; @end

AppBar

MDCAppBar

modified property: inferTopSafeAreaInsetFromViewController in MDCAppBar

Type of change: Declaration
From: @property (assign, readwrite, nonatomic) int inferTopSafeAreaInsetFromViewController;
To: @property (assign, readwrite, nonatomic) BOOL inferTopSafeAreaInsetFromViewController;

modified class: MDCAppBar

Type of change: Declaration
From: @interface MDCAppBar
To: @interface MDCAppBar : NSObject

Cards

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; /** 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

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; /** 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

Chips

MDCChipView

modified method: -setShadowColor:forState: in MDCChipView

Type of change: Declaration
From: - (void)setShadowColor:(nullable UIColor *)shadowColor forState:(UIControlState)state UI_APPEARANCE_SELECTOR;
To: - (void)setShadowColor:(nullable UIColor *)shadowColor forState:(UIControlState)state UI_APPEARANCE_SELECTOR;

modified class: MDCChipView

Type of change: Declaration
From: @interface MDCChipView : UIControl /* A UIImageView that leads the title label. */ @property(nonatomic, readonly, nonnull) IBInspectable UIImageView *imageView; /* A UIImageView that leads the title label. Appears in front of the imageView. Only visible when the chip is selected. This image view is typically used to show some icon that denotes the chip as selected, such as a check mark. If imageView has no image then the chip will require resizing when selected or deselected to account for the changing visibility of selectedImageView. */ @property(nonatomic, readonly, nonnull) IBInspectable UIImageView *selectedImageView; /* A UIView that trails the title label. It will be given a size based on the value returned from sizeThatFits:. */ @property(nonatomic, strong, nullable) IBInspectable UIView *accessoryView; /* The title label. @note The title color is controlled by setTitleColor:forState:. @note The title font is controlled by setTitleFont. */ @property(nonatomic, readonly, nonnull) IBInspectable UILabel *titleLabel; /* Padding around the chip content. Each subview can be further padded with their invidual padding property. The chip uses this property to determine intrinsicContentSize and sizeThatFits. Defaults to (4, 4, 4, 4). */ @property(nonatomic, assign) UIEdgeInsets contentPadding UI_APPEARANCE_SELECTOR; /* Padding around the image view. Only used if the image view has a non-nil image. The chip uses this property to determine intrinsicContentSize and sizeThatFits. Defaults to (0, 0, 0, 0). */ @property(nonatomic, assign) UIEdgeInsets imagePadding UI_APPEARANCE_SELECTOR; /* Padding around the accessory view. Only used if the accessory view is non-nil. The chip uses this property to determine intrinsicContentSize and sizeThatFits. Defaults to (0, 0, 0, 0). */ @property(nonatomic, assign) UIEdgeInsets accessoryPadding UI_APPEARANCE_SELECTOR; /* Padding around the title. The chip uses this property to determine intrinsicContentSize and sizeThatFits. Defaults to (3, 8, 4, 8). The top padding is shorter so the default height of a chip is 32 pts. */ @property(nonatomic, assign) UIEdgeInsets titlePadding UI_APPEARANCE_SELECTOR; /* Font used to render the title. If nil, the chip will use the system font. */ @property(nonatomic, strong, nullable) UIFont *titleFont UI_APPEARANCE_SELECTOR; /* The color of the ink ripple. */ @property(nonatomic, strong, null_resettable) UIColor *inkColor UI_APPEARANCE_SELECTOR __deprecated_msg("Use setInkColor:forState:"); /* The shape generator used to define the chip's shape. */ @property(nullable, nonatomic, strong) id<MDCShapeGenerating> shapeGenerator UI_APPEARANCE_SELECTOR; /* Indicates whether the chip should automatically update its font when the device’s UIContentSizeCategory is changed. This property is modeled after the adjustsFontForContentSizeCategory property in the UIContentSizeCategoryAdjusting protocol added by Apple in iOS 10.0. If set to YES, this button will base its text font on MDCFontTextStyleButton. Default value is NO. */ @property(nonatomic, readwrite, setter=mdc_setAdjustsFontForContentSizeCategory:) BOOL mdc_adjustsFontForContentSizeCategory UI_APPEARANCE_SELECTOR; /** The minimum dimensions of the Chip. A non-positive value for either height or width is equivalent to no minimum for that dimension. Defaults to a minimum height of 32 points, and no minimum width. */ @property(nonatomic, assign) CGSize minimumSize UI_APPEARANCE_SELECTOR; /** Custom insets to use when computing touch targets. A positive inset value will shrink the hit area for the Chip. */ @property(nonatomic, assign) UIEdgeInsets hitAreaInsets; /* A color used as the chip's @c backgroundColor for @c state. If no background color has been set for a given state, the returned value will fall back to the value set for UIControlStateNormal. @param state The control state. @return The background color. */ - (nullable UIColor *)backgroundColorForState:(UIControlState)state; /* A color used as the chip's @c backgroundColor. Defaults to blue. @param backgroundColor The background color. @param state The control state. */ - (void)setBackgroundColor:(nullable UIColor *)backgroundColor forState:(UIControlState)state UI_APPEARANCE_SELECTOR; /* Returns the border color for a particular control state. If no border width has been set for a given state, the returned value will fall back to the value set for UIControlStateNormal. @param state The control state. @return The border color for the requested state. */ - (nullable UIColor *)borderColorForState:(UIControlState)state; /* Sets the border color for a particular control state. @param borderColor The border color. @param state The control state. */ - (void)setBorderColor:(nullable UIColor *)borderColor forState:(UIControlState)state UI_APPEARANCE_SELECTOR; /* Returns the border width for a particular control state. If no border width has been set for a given state, the returned value will fall back to the value set for UIControlStateNormal. @param state The control state. @return The border width for the requested state. */ - (CGFloat)borderWidthForState:(UIControlState)state; /* Sets the border width for a particular control state. @param borderWidth The border width. @param state The control state. */ - (void)setBorderWidth:(CGFloat)borderWidth forState:(UIControlState)state UI_APPEARANCE_SELECTOR; /* Returns the elevation for a particular control state. If no elevation has been set for a given state, the returned value will fall back to the value set for UIControlStateNormal. @param state The control state. @return The elevation for the requested state. */ - (MDCShadowElevation)elevationForState:(UIControlState)state; /* Sets the elevation for a particular control state. @param elevation The elevation. @param state The control state. */ - (void)setElevation:(MDCShadowElevation)elevation forState:(UIControlState)state UI_APPEARANCE_SELECTOR; /* Returns the ink color for a particular control state. If no ink color has been set for a given state, the returned value will fall back to the value set for UIControlStateNormal. Defaults to nil. When nil MDCInkView.defaultInkColor is used. @param state The control state. @return The ink color for the requested state. */ - (nullable UIColor *)inkColorForState:(UIControlState)state; /* Sets the ink color for a particular control state. @param inkColor The ink color. @param state The control state. */ - (void)setInkColor:(nullable UIColor *)inkColor forState:(UIControlState)state UI_APPEARANCE_SELECTOR; /* Returns the shadow color for a particular control state. If no shadow color has been set for a given state, the returned value will fall back to the value set for UIControlStateNormal. @param state The control state. @return The shadow color for the requested state. */ - (nullable UIColor *)shadowColorForState:(UIControlState)state; /* Sets the shadow color for a particular control state. @param elevation The shadow color. @param state The control state. */ - (void)setShadowColor:(nullable UIColor *)shadowColor forState:(UIControlState)state UI_APPEARANCE_SELECTOR; /* Returns the title color for a particular control state. If no title color has been set for a given state, the returned value will fall back to the value set for UIControlStateNormal. @param state The control state. @return The title color for the requested state. */ - (nullable UIColor *)titleColorForState:(UIControlState)state; /* Sets the title color for a particular control state. @param titleColor The title color. @param state The control state. */ - (void)setTitleColor:(nullable UIColor *)titleColor forState:(UIControlState)state UI_APPEARANCE_SELECTOR; @end
To: @interface MDCChipView : UIControl /* A UIImageView that leads the title label. */ @property(nonatomic, readonly, nonnull) IBInspectable UIImageView *imageView; /* A UIImageView that leads the title label. Appears in front of the imageView. Only visible when the chip is selected. This image view is typically used to show some icon that denotes the chip as selected, such as a check mark. If imageView has no image then the chip will require resizing when selected or deselected to account for the changing visibility of selectedImageView. */ @property(nonatomic, readonly, nonnull) IBInspectable UIImageView *selectedImageView; /* A UIView that trails the title label. It will be given a size based on the value returned from sizeThatFits:. */ @property(nonatomic, strong, nullable) IBInspectable UIView *accessoryView; /* The title label. @note The title color is controlled by setTitleColor:forState:. @note The title font is controlled by setTitleFont. */ @property(nonatomic, readonly, nonnull) IBInspectable UILabel *titleLabel; /* Padding around the chip content. Each subview can be further padded with their invidual padding property. The chip uses this property to determine intrinsicContentSize and sizeThatFits. Defaults to (4, 4, 4, 4). */ @property(nonatomic, assign) UIEdgeInsets contentPadding UI_APPEARANCE_SELECTOR; /* Padding around the image view. Only used if the image view has a non-nil image. The chip uses this property to determine intrinsicContentSize and sizeThatFits. Defaults to (0, 0, 0, 0). */ @property(nonatomic, assign) UIEdgeInsets imagePadding UI_APPEARANCE_SELECTOR; /* Padding around the accessory view. Only used if the accessory view is non-nil. The chip uses this property to determine intrinsicContentSize and sizeThatFits. Defaults to (0, 0, 0, 0). */ @property(nonatomic, assign) UIEdgeInsets accessoryPadding UI_APPEARANCE_SELECTOR; /* Padding around the title. The chip uses this property to determine intrinsicContentSize and sizeThatFits. Defaults to (3, 8, 4, 8). The top padding is shorter so the default height of a chip is 32 pts. */ @property(nonatomic, assign) UIEdgeInsets titlePadding UI_APPEARANCE_SELECTOR; /* Font used to render the title. If nil, the chip will use the system font. */ @property(nonatomic, strong, nullable) UIFont *titleFont UI_APPEARANCE_SELECTOR; /* The color of the ink ripple. */ @property(nonatomic, strong, null_resettable) UIColor *inkColor UI_APPEARANCE_SELECTOR __deprecated_msg("Use setInkColor:forState:"); /* The shape generator used to define the chip's shape. */ @property(nullable, nonatomic, strong) id<MDCShapeGenerating> shapeGenerator UI_APPEARANCE_SELECTOR; /* Indicates whether the chip should automatically update its font when the device’s UIContentSizeCategory is changed. This property is modeled after the adjustsFontForContentSizeCategory property in the UIContentSizeCategoryAdjusting protocol added by Apple in iOS 10.0. If set to YES, this button will base its text font on MDCFontTextStyleButton. Default value is NO. */ @property(nonatomic, readwrite, setter=mdc_setAdjustsFontForContentSizeCategory:) BOOL mdc_adjustsFontForContentSizeCategory UI_APPEARANCE_SELECTOR; /** The minimum dimensions of the Chip. A non-positive value for either height or width is equivalent to no minimum for that dimension. Defaults to a minimum height of 32 points, and no minimum width. */ @property(nonatomic, assign) CGSize minimumSize UI_APPEARANCE_SELECTOR; /** Custom insets to use when computing touch targets. A positive inset value will shrink the hit area for the Chip. */ @property(nonatomic, assign) UIEdgeInsets hitAreaInsets; /* A color used as the chip's @c backgroundColor for @c state. If no background color has been set for a given state, the returned value will fall back to the value set for UIControlStateNormal. @param state The control state. @return The background color. */ - (nullable UIColor *)backgroundColorForState:(UIControlState)state; /* A color used as the chip's @c backgroundColor. Defaults to blue. @param backgroundColor The background color. @param state The control state. */ - (void)setBackgroundColor:(nullable UIColor *)backgroundColor forState:(UIControlState)state UI_APPEARANCE_SELECTOR; /* Returns the border color for a particular control state. If no border width has been set for a given state, the returned value will fall back to the value set for UIControlStateNormal. @param state The control state. @return The border color for the requested state. */ - (nullable UIColor *)borderColorForState:(UIControlState)state; /* Sets the border color for a particular control state. @param borderColor The border color. @param state The control state. */ - (void)setBorderColor:(nullable UIColor *)borderColor forState:(UIControlState)state UI_APPEARANCE_SELECTOR; /* Returns the border width for a particular control state. If no border width has been set for a given state, the returned value will fall back to the value set for UIControlStateNormal. @param state The control state. @return The border width for the requested state. */ - (CGFloat)borderWidthForState:(UIControlState)state; /* Sets the border width for a particular control state. @param borderWidth The border width. @param state The control state. */ - (void)setBorderWidth:(CGFloat)borderWidth forState:(UIControlState)state UI_APPEARANCE_SELECTOR; /* Returns the elevation for a particular control state. If no elevation has been set for a given state, the returned value will fall back to the value set for UIControlStateNormal. @param state The control state. @return The elevation for the requested state. */ - (MDCShadowElevation)elevationForState:(UIControlState)state; /* Sets the elevation for a particular control state. @param elevation The elevation. @param state The control state. */ - (void)setElevation:(MDCShadowElevation)elevation forState:(UIControlState)state UI_APPEARANCE_SELECTOR; /* Returns the ink color for a particular control state. If no ink color has been set for a given state, the returned value will fall back to the value set for UIControlStateNormal. Defaults to nil. When nil MDCInkView.defaultInkColor is used. @param state The control state. @return The ink color for the requested state. */ - (nullable UIColor *)inkColorForState:(UIControlState)state; /* Sets the ink color for a particular control state. @param inkColor The ink color. @param state The control state. */ - (void)setInkColor:(nullable UIColor *)inkColor forState:(UIControlState)state UI_APPEARANCE_SELECTOR; /* Returns the shadow color for a particular control state. If no shadow color has been set for a given state, the returned value will fall back to the value set for UIControlStateNormal. @param state The control state. @return The shadow color for the requested state. */ - (nullable UIColor *)shadowColorForState:(UIControlState)state; /* Sets the shadow color for a particular control state. @param elevation The shadow color. @param state The control state. */ - (void)setShadowColor:(nullable UIColor *)shadowColor forState:(UIControlState)state UI_APPEARANCE_SELECTOR; /* Returns the title color for a particular control state. If no title color has been set for a given state, the returned value will fall back to the value set for UIControlStateNormal. @param state The control state. @return The title color for the requested state. */ - (nullable UIColor *)titleColorForState:(UIControlState)state; /* Sets the title color for a particular control state. @param titleColor The title color. @param state The control state. */ - (void)setTitleColor:(nullable UIColor *)titleColor forState:(UIControlState)state UI_APPEARANCE_SELECTOR; @end

modified method: -setTitleColor:forState: in MDCChipView

Type of change: Declaration
From: - (void)setTitleColor:(nullable UIColor *)titleColor forState:(UIControlState)state UI_APPEARANCE_SELECTOR;
To: - (void)setTitleColor:(nullable UIColor *)titleColor forState:(UIControlState)state UI_APPEARANCE_SELECTOR;

modified property: inkColor in MDCChipView

Type of change: Declaration
From: @property(nonatomic, strong, null_resettable) UIColor *inkColor
To: @property(nonatomic, strong, null_resettable) UIColor *inkColor

modified method: -setBorderColor:forState: in MDCChipView

Type of change: Declaration
From: - (void)setBorderColor:(nullable UIColor *)borderColor forState:(UIControlState)state UI_APPEARANCE_SELECTOR;
To: - (void)setBorderColor:(nullable UIColor *)borderColor forState:(UIControlState)state UI_APPEARANCE_SELECTOR;

modified method: -setElevation:forState: in MDCChipView

Type of change: Declaration
From: - (void)setElevation:(MDCShadowElevation)elevation forState:(UIControlState)state UI_APPEARANCE_SELECTOR;
To: - (void)setElevation:(MDCShadowElevation)elevation forState:(UIControlState)state UI_APPEARANCE_SELECTOR;

modified method: -setBackgroundColor:forState: in MDCChipView

Type of change: Declaration
From: - (void)setBackgroundColor:(nullable UIColor *)backgroundColor forState:(UIControlState)state UI_APPEARANCE_SELECTOR;
To: - (void)setBackgroundColor:(nullable UIColor *)backgroundColor forState:(UIControlState)state UI_APPEARANCE_SELECTOR;

modified method: -setInkColor:forState: in MDCChipView

Type of change: Declaration
From: - (void)setInkColor:(nullable UIColor *)inkColor forState:(UIControlState)state UI_APPEARANCE_SELECTOR;
To: - (void)setInkColor:(nullable UIColor *)inkColor forState:(UIControlState)state UI_APPEARANCE_SELECTOR;

FlexibleHeader

MDCFlexibleHeaderContainerViewController

modified method: -initWithContentViewController: in MDCFlexibleHeaderContainerViewController

Type of change: Declaration
From: - (nonnull instancetype)initWithContentViewController: (nullable UIViewController *)contentViewController NS_DESIGNATED_INITIALIZER;
To: - (nonnull instancetype)initWithContentViewController: (nullable UIViewController *)contentViewController NS_DESIGNATED_INITIALIZER;

MDCFlexibleHeaderView()

new category: MDCFlexibleHeaderView()

removed category: MDCFlexibleHeaderView()

modified property: contentView in MDCFlexibleHeaderView()

Type of change: parent.usr
From: c:objc(ext)[email protected]@14991
To: c:objc(ext)[email protected]@14987

List

MDCBaseCell

modified class: MDCBaseCell

Type of change: Declaration
From: @interface MDCBaseCell : UICollectionViewCell /** The current elevation of the cell. */ @property (nonatomic, assign) MDCShadowElevation elevation; /** The color of the cell’s underlying Ripple. */ @property (nonatomic, strong, nonnull) UIColor *inkColor; @end
To: @interface MDCBaseCell : UICollectionViewCell /** The current elevation of the cell. */ @property(nonatomic, assign) MDCShadowElevation elevation; /** The color of the cell’s underlying Ripple. */ @property(nonatomic, strong, nonnull) UIColor *inkColor; @end

Snackbar

MDCSnackbarMessageView()

new category: MDCSnackbarMessageView()

removed category: MDCSnackbarMessageView()

modified property: snackbarMessageViewTextColor in MDCSnackbarMessageView()

Type of change: parent.usr
From: c:objc(ext)[email protected]@3438
To: c:objc(ext)[email protected]@3460

Tabs

MDCTabBarIndicatorTemplate

modified protocol: MDCTabBarIndicatorTemplate

Type of change: Declaration
From: @protocol MDCTabBarIndicatorTemplate <NSObject> /** Returns an attributes object that describes how the indicator should appear in a given context. */ - (nonnull MDCTabBarIndicatorAttributes *) indicatorAttributesForContext:(nonnull id<MDCTabBarIndicatorContext>)context; @end
To: @protocol MDCTabBarIndicatorTemplate <NSObject> /** Returns an attributes object that describes how the indicator should appear in a given context. */ - (nonnull MDCTabBarIndicatorAttributes *)indicatorAttributesForContext: (nonnull id<MDCTabBarIndicatorContext>)context; @end

@jverkoey
Copy link
Contributor

Detected lots of bugs in the apidiff toolchain as well!

@jverkoey
Copy link
Contributor

Filed material-motion/apidiff#27 to track.

@yarneo yarneo changed the title [WIP] if we ran clang-format on the entire codebase ran clang-format on the entire codebase Jan 11, 2019
@yarneo yarneo merged commit 2803125 into material-components:develop Jan 11, 2019
yarneo added a commit that referenced this pull request Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment