The visibility of the leading columns in a navigation split view.
Use a value of this type to control the visibility of the columns of a
``NavigationSplitView``. Create a ``State`` property with a
value of this type, and pass a ``Binding`` to that state to the
``NavigationSplitView/init(columnVisibility:sidebar:detail:)`` or
``NavigationSplitView/init(columnVisibility:sidebar:content:detail:)``
initializer when you create the navigation split view. You can then
modify the value elsewhere in your code to:
* Hide all but the trailing column with ``detailOnly``.
* Hide the leading column of a three-column navigation split view
with ``doubleColumn``.
* Show all the columns with ``all``.
* Rely on the automatic behavior for the current context with ``automatic``.
>Note: Some platforms don't respect every option. For example, macOS always
displays the content column.
Members (4)
get · iOS 16.0+
detailOnly
TypeScript
static get detailOnly(): NavigationSplitViewVisibility
Swift declaration
static var detailOnly: NavigationSplitViewVisibility { get }
Hide the leading two columns of a three-column navigation split view, so
that just the detail area shows.
get · iOS 16.0+
doubleColumn
TypeScript
static get doubleColumn(): NavigationSplitViewVisibility
Swift declaration
static var doubleColumn: NavigationSplitViewVisibility { get }
Show the content column and detail area of a three-column navigation
split view, or the sidebar column and detail area of a two-column
navigation split view.
For a two-column navigation split view, `doubleColumn` is equivalent
to `all`.
get · iOS 16.0+
all
TypeScript
static get all(): NavigationSplitViewVisibility
Swift declaration
static var all: NavigationSplitViewVisibility { get }
Show all the columns of a three-column navigation split view.
get · iOS 16.0+
automatic
TypeScript
static get automatic(): NavigationSplitViewVisibility
Swift declaration
static var automatic: NavigationSplitViewVisibility { get }
Use the default leading column visibility for the current device.
This computed property returns one of the three concrete cases:
``detailOnly``, ``doubleColumn``, or ``all``.