Navigating in and out of a NavigationSplitView

The new NavigationSplitView is very handy. I want to use it for a settings screen, but I need a way to navigate in and out of it.

Previously I just navigated in and out of my settings using a NavigationView.

But if I change this to a NavigationStack, and then navigate forward into a NavigationSplitView from it, it almost works fine, but some weirdness happens: on iPhone there are two competing back arrows (i.e "<") and on an iPad there is weird spacing at the top of the screen.

  1. Should I be able to navigate from a NavigationStack into a NavigationSplit View?
  2. If so, are these known issues?
  3. If not, is there a recommended UI for navigating in and out of a NavigationSplitView from the rest of my iPhone/iPad app?

thanks!

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

Replies

I observed something similar trying to put a NavigationSplitView inside a NavigationStack.

Let's hope this is a beta (1) problem and perhaps there is even a beta 2 today with improvements.

Does anyone know if this setup should work?

Still happening with beta 2, filed FB10423650 with video captures.

  • In this WWDC Video the reverse case is shown: NavigationStack inside of NavigationSplitView.

    Still hoping both cases will be supported in later betas.

  • Even more specifically, in wwdc2022-10052, it says: "NavigationSplitView and NavigationStack are designed to work together and can be directly composed to build more complex navigation structures." So it sure sounds like that is the intent.

Add a Comment

Has anyone got this to work? A NavigationSplitView inside of a NavigationStack? It still does not work in Xcode 14.1, iPadOS 16 Beta 2