|
Sorry if I'm repeating a settled topic here, but I'm not sure the right way to phrase this question to get the desired answer. I want to create a grouped list. Each group should be separated by var category = String. Here's my data model:
Here's my list code:
As you can see, I'm able to put the category at the top of the side-scrolling list... But SwiftUI makes a discrete list for each instance of "category"; I only want one category line for each category. Please help! |
|
Would be useful if you could share details on this object |
|
|
|
hi, there was a related discussion of this just last week, so see this thread. (it was in the HWS Plus forum, but as a trial HWS+ member, you might still be able to see it?) hope that helps, DMG |
|
I suppose one of the ways to handle this is to prepare data for such view, something like this. As to my understanding with your current model you cannot handle sections properly.
|
SPONSORED Get accurate app localizations in minutes using AI. Choose your languages & receive translations for 40+ markets!
Sponsor Hacking with Swift and reach the world's largest Swift community!
You need to create an account or log in to reply.
All interactions here are governed by our code of conduct.
Link copied to your pasteboard.