Link Search Menu Expand Document

Button

A control that executes your custom code in response to user interactions.

public class Button: Control 

Inheritance

Control

Initializers

init(frame:)

Creates a new button with the specified frame.

public init(frame: Rect) 

init(frame:primaryAction:)

Creates a new button with the specified frame, registers the primary action event, and sets the title and image to the action’s title and image.

public convenience init(frame: Rect, primaryAction: Action?) 

Methods

setTitle(_:forState:)

Sets the title to use for the specified state.

public func setTitle(_ title: String?, forState state: Control.State)