0

I have an array of cards and want to put them into an array of decks. Users can make their own decks and creates cards within. I've finished making the flashcard part of the app and you can make one deck only.

    NavigationView {
        Section {
            List(decks) { deck in
                
                NavigationButton(destination: ContentView (deck: testDeck))
                
                DecksRow(deck: testDeck)
                
            }
        }
    } .navigationBarTitle(Text: "Rows")
}

I am new to swiftUI.

yeti
  • 1
  • 1
    It isn't clear to me what you're trying to accomplish here. You also haven't included enough code to show what's going on. What is `decks`? Where did `testDeck` come from? Which array is supposed to be "inside" the other? What's the expected result? – jnpdx Jun 07 '21 at 16:48
  • Yep if you move your decks into a ForEach (which can still be contained within a list) then you can nest another forEach within it to show each card. – rlong405 Jun 07 '21 at 19:13

0 Answers0