WindowToolbarFullScreenVisibility

The visibility of the window toolbar with respect to full screen mode.

StructureiOS 18.0+macOS 15.0+tvOS 18.0+watchOS 11.0+visionOS 2.0+WindowToolbarFullScreenVisibility in SwiftUI

Declaration

React
type WindowToolbarFullScreenVisibility = 'automatic';
Swift
struct WindowToolbarFullScreenVisibility

Pass a literal, or build one with SwiftUI.WindowToolbarFullScreenVisibility from import { SwiftUI } from 'swiftui-react-native'.

Type properties

Overview

Use values of this type in conjunction with the View.windowToolbarFullScreenVisibility(_:) modifier to configure how the window toolbar displays itself when the window enters full screen mode.

For example, you can specify that the window toolbar should be hidden by default, and only show when the mouse moves into the area occupied by the menu bar:

struct RootView: View {
    var body: some View {
        ContentView()
            .toolbar {
                ...
            }
            .windowToolbarFullScreenVisibility(.onHover)
    }
}

From Apple’s SwiftUI documentation. Code samples there are Swift.

Used by

See also

More in Navigation.