BLACK FRIDAY SALE: Save big on all my Swift books and bundles! >>

side-by-side NavStacks busted inside NavSplitView detail

Forums > SwiftUI

@fkuhl  

Building an app using iPadOS 16, NavigationSplitView with siderbar and detail. Inside detail are two NavigationStacks side-by-side in an HStack. Two Stacks work just fine outside a NavSplitView; inside a DetailView they get confused as if there is already a NavigationStack inside the Detail. Anybody else seen this?

   

@fkuhl  

Upon further reflection I realize that, with side-by-side nav stacks in my detail view, I'm re-inventing the 3-col split. Never good to re-invent. So I've moved to a 3-col split, with one nav stack in the content view and the other nav stack in the detail view. Works nicely. (Though a 3-col split isn't the best for some categories of info.)

   

Hacking with Swift is sponsored by RevenueCat

SPONSORED In-app subscriptions are a pain to implement, hard to test, and full of edge cases. RevenueCat makes it straightforward and reliable so you can get back to building your app. Oh, and it's free if your app makes less than $10k/mo.

Learn more

Sponsor Hacking with Swift and reach the world's largest Swift community!

Reply to this topic…

You need to create an account or log in to reply.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.