Button Preview

A button triggers a single action or event.

Use buttons for important actions like submitting a response, committing a change, or moving to the next step. If you need to navigate to another place, try a link instead.



The Button can be initialized with a ButtonStyle parameter as follows:

let button = Button(style: style)


There is currently no SwiftUI implementation of the Button.


Control name

Button in Swift, MSFButton in Objective-C.

Source Code

Sample Code