Correct way to hide sidebar after selection.

In a triple-column split view, it's common to hide the primary view when the user selects an item from a list.

In some cases, the supplemental view is also hidden when an item is selected from that list, thus leaving only the detail view visible.

What is the correct way to hide the primary view on selection and then to optionally hide the supplemental view on selection using the new NavigationStack?

(Notes is a good example of the sidebars hiding after the user selects a folder in the sidebar.)

Post not yet marked as solved Up vote post of kennyc Down vote post of kennyc
1.2k views

Replies

Looks like it's as simple as attached a binder to columnVisibility in the NavigationStackView initializer and setting an appropriate column visibility value as needed.