Contents

UIButton.Configuration

A configuration that specifies the appearance and behavior of a button and its contents.

Declaration

struct Configuration

Overview

You can configure and update a button with a UIButton.Configuration. A button configuration contains all the customization options available with other methods, such as setTitle(_:for:), and can serve as a replacement for those methods. Alternatively, you can use a configuration in combination with these other methods and adopt new button behaviors and appearance without rewriting your customized UIButton code.

Topics

Creating configurations

Configuring titles

Configuring images

Configuring layout

Configuring button colors

Configuring the button background

Configuring the indicator

Configuring the activity indicator

Configuring selection behavior

Configuring the appearance on macOS

Instance Properties

See Also

Creating buttons from a configuration object