Post

Replies

Boosts

Views

Activity

Comment on SwiftUI: List selection of custom struct
Hi.my problem was that in the ForEach I was creating two Text views, both were selectable, but that was incorrect. Only one should have been, as they both, together, represent one unique entry. My solution was to group these two Text views together inside one common VStack and thus, when selection either the title, i.e. the first Text view, or the subtitle, i.e. the second Text view, it would not matter, and it would result in selecting the same entry, and not treating them as two.
Sep ’22