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

v67.2.0

Choose a tag to compare

@jverkoey jverkoey released this 23 Oct 14:58
· 4190 commits to stable since this release

This minor release introduces new functionality for theming individual buttons of an
MDCAlertController.

New features

It is now possible to theme MDCAlertController buttons individually using the new emphasis
property on MDCAlertAction in conjunction with the MDCAlertControllerThemer.

let alert = MDCAlertController(title: "Button Theming", message: "High, Medium & Low Emphasis")

alert.addAction(MDCAlertAction(title:"High", emphasis: .high, handler: <#handler#>))
alert.addAction(MDCAlertAction(title:"Medium", emphasis: .medium, handler: <#handler#>))
alert.addAction(MDCAlertAction(title:"Low", emphasis: .low, handler: <#handler#>))

MDCAlertControllerThemer.applyScheme(<#alertScheme#>, to: alert)

self.present(alert, animated: true, completion: nil)

API changes

Dialogs+DialogThemer

MDCAlertScheming

new property: buttonScheme in MDCAlertScheming

MDCAlertScheme

new property: buttonScheme in MDCAlertScheme

Dialogs

MDCAlertController

modified property: elevation in MDCAlertController

Type of change: Swift declaration
From: var elevation: CGFloat { get set }
To: var elevation: Int32 { get set }

modified property: elevation in MDCAlertController

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

MDCActionEmphasis

new enum: MDCActionEmphasis

new enum value: MDCActionEmphasisLow in MDCActionEmphasis

new enum value: MDCActionEmphasisMedium in MDCActionEmphasis

new enum value: MDCActionEmphasisHigh in MDCActionEmphasis

MDCDialogPresentationController

modified property: dialogElevation in MDCDialogPresentationController

Type of change: Swift declaration
From: var dialogElevation: CGFloat { get set }
To: var dialogElevation: Int32 { get set }

modified property: dialogElevation in MDCDialogPresentationController

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

MDCAlertAction

new property: emphasis in MDCAlertAction

new class method: +actionWithTitle:emphasis:handler: in MDCAlertAction

Component changes

Dialogs