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.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Sep ’22
Comment on How to await inside SwiftUI a #Preview?
Thanks, while I fully appreciate your answer, I have to ask, don't you feel this is a design problem (for the SwiftUI team)? I mean… it's kind of hard to write a wrapper; imagine if the object was more complex.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Mar ’25
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.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’22