I’m using a NavigationSplitView
to present a two-column view, with a sidebar and detail content on iPad, which is collapsed into a single-column view on iPhone and when the app is used in Split View and Slide Over.
I’d like to style some of the content in my sidebar differently and reorganize some of the content depending on whether or not it’s currently being used as a sidebar alongside a detail view, or if only a single column is visible.
Reading the column visibility (NavigationSplitViewVisibility
) doesn’t work, as it only seems to update in response to the user toggling the sidebar manually. The .automatic
mode is always set, regardless of whether the sidebar is actually visible at the moment.