Contents

WindowInteractionBehavior

Options for enabling and disabling window interaction behaviors.

Declaration

struct WindowInteractionBehavior

Overview

Use values of this type in conjunction with the following view and scene modifiers to adjust the supported functionality for the window:

For example, you can create a custom “About” window which only allows for dismissal:

struct MyApp: App {
    var body: some Scene {
        ...
        Window("About MyApp", id: "about") {
            AboutView()
                .windowMinimizeBehavior(.disabled)
                .windowResizeBehavior(.disabled)
        }
        .windowResizability(.contentSize)
    }
}

Topics

Type Properties

See Also

Managing window behavior