Instance Method インスタンスメソッド

commands(content:)

Adds commands to the scene. コマンドをシーンに加えます。

Declaration 宣言

func commands<Content>(content: () -> Content) -> some Scene where Content : Commands

Discussion 議論

Commands are realized in different ways on different platforms. On macOS, the main menu uses the available command menus and groups to organize its main menu items. Each menu is represented as a top-level menu bar menu, and each command group has a corresponding set of menu items in one of the top-level menus, delimited by separator menu items.

On iPadOS, commands with keyboard shortcuts are exposed in the shortcut discoverability HUD that users see when they hold down the Command (⌘) key.