Hello,
I am trying to programmatically nest lists within each other so the app transitions like NavigationLinks towards the right, and you can progressively step in and out of lists, but the Navigation Bar keeps expanding (image in the StackOverflow link below).
Is there a better way to structure and implement this than NavigationViews?
My data structure is as follows, some children may have nested arrays (I can change this). Eg:
{"News":
"Business": "Energy", "Industrials", "Finance" : [{"Banking", "Markets"}],
"Tech": {"Developers", "Startups", "FAANG", "Indie"},
"Current Affairs"
}
This StackOverflow discussion says there should only be one NavigationView.
When I used NavigationLinks without declaring it in a NavigationView for a "middle" child views ("Finance" or "Tech"), the back button goes directly to the root view, but I would like for it traverse the prior views too. For example, News -> Business -> Finance -> Banking, and then using the back button to go from Banking -> Finance -> Business -> News rather than Banking -> News
Using .navigationBarHidden(true) on the root and middle views ends up showing 2 or more back buttons as shown in this image
I'm trying to replicate the UI for browsing Spotify's Podcast Categories, but I have subcategories too.
I would really appreciate any help or pointers for this!