Generic Structure


A control that performs an action when triggered.


struct Button<Label> where Label : View


The method of “triggering” the button may vary. For example, on iOS a button is triggered by tapping it onscreen, whereas on tvOS it’s triggered by pressing “select” on an external remote while the button is focused.


Conforms To

See Also


struct NavigationLink

A button that triggers a navigation presentation when pressed.

struct MenuButton

A button that displays a menu containing a list of choices when pressed.

struct EditButton

A button that toggles the edit mode for the current edit scope.

struct PasteButton

A system button that triggers reading data from the pasteboard.