Skip to content
This repository was archived by the owner on Dec 11, 2025. It is now read-only.

v87.0.0

Choose a tag to compare

@romoore romoore released this 13 Aug 14:53
· 2487 commits to stable since this release

This major release improves the traitCollectionDidChangeBlock for
MDCButton.

Breaking changes

MDCButton.traitCollectionDidChangeBlock now requires an MDCButton *
instance as its first parameter. This is to allow passing the button itself
into the block and eliminate the need for retaining the button in its own
block.

Previous Releases

button.traitCollectionDidChangeBlock =
    ^(UITraitCollection *_Nullable previousTraitCollection) {
      // Code
    };

In This Release

button.traitCollectionDidChangeBlock =
    ^(MDCButton *_Nonnull buttonInBlock, UITraitCollection *_Nullable previousTraitCollection) {
      // Code
    };

API changes

Buttons

MDCButton

modified property: traitCollectionDidChangeBlock in MDCButton

Type of change: Swift declaration
From: var traitCollectionDidChangeBlock: ((UITraitCollection?) -> Void)? { get set }
To: var traitCollectionDidChangeBlock: ((MDCButton, UITraitCollection?) -> Void)? { get set }

modified property: traitCollectionDidChangeBlock in MDCButton

Type of change: Declaration
From: @property (readwrite, copy, nonatomic, nullable) void (^) (UITraitCollection *_Nullable) traitCollectionDidChangeBlock;
To: @property (readwrite, copy, nonatomic, nullable) void (^) (MDCButton *_Nonnull, UITraitCollection *_Nullable) traitCollectionDidChangeBlock;

Changes

ActionSheet

ButtonBar

Buttons

FlexibleHeader

NavigationBar

TextFields