UIButton.Configuration
A configuration that specifies the appearance and behavior of a button and its contents.
Declaration
struct ConfigurationOverview
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
plain()gray()tinted()filled()borderless()bordered()borderedTinted()borderedProminent()glass()prominentGlass()clearGlass()prominentClearGlass()updated(for:)
Configuring titles
titlesubtitleattributedTitleattributedSubtitletitleTextAttributesTransformersubtitleTextAttributesTransformerUIConfigurationTextAttributesTransformertitlePaddingtitleAlignmentUIButton.Configuration.TitleAlignmenttitleLineBreakModesubtitleLineBreakMode
Configuring images
imageimagePaddingimagePlacementimageReservationimageColorTransformerpreferredSymbolConfigurationForImage