SwiftUI Components — Buttons

Button (text, action)

A button with the name “Deal” that runs the action deal(). Buttons also support modifiers.

Original page had a screenshot here.

Button (action, label)

The label: form lets you put an image as the button, so the user interacts with the UI element directly.

Original page had a screenshot here.

Type conversion

  • String()
  • Int()
  • Bool()
  • Double()

Original page had a screenshot here.

See next