Contents

InspectorCommands

A built-in set of commands for manipulating inspectors.

Declaration

struct InspectorCommands

Overview

InspectorCommands include a command for toggling the presented state of the inspector with a keyboard shortcut of Control-Command-I.

These commands are optional and can be explicitly requested by passing a value of this type to the commands(content:) modifier:

@State var presented = true
WindowGroup {
    MainView()
        .inspector(isPresented: $presented) {
            InspectorView()
        }
}
.commands {
    InspectorCommands()
}

Topics

Creating a command

See Also

Getting built-in command groups