Contents

init(columnVisibility:preferredCompactColumn:sidebar:detail:)

Creates a two-column navigation split view that enables programmatic control of the sidebar’s visibility in regular sizes and which column appears on top when the view collapses into a single column in narrow sizes.

Declaration

nonisolated init(columnVisibility: Binding<NavigationSplitViewVisibility>, preferredCompactColumn: Binding<NavigationSplitViewColumn>, @ViewBuilder sidebar: () -> Sidebar, @ViewBuilder detail: () -> Detail) where Content == EmptyView

Parameters

  • columnVisibility:

    A Binding to state that controls the visibility of the leading column.

  • preferredCompactColumn:

    A Binding to state that controls which column appears on top when the view collapses.

  • sidebar:

    The view to show in the leading column.

  • detail:

    The view to show in the detail area.

See Also

Specifying a preferred compact column and column visibility