I have web game and here is it's screenshot
As you can see it can detect clicks on each word as they are just spans inside a flex layout.
I want to have a similar functionality in SwiftUi as I am building an iOS app for this game.
I tried GridView
, HStack
s, they just seem to have limitations
HStack
will only render in one line, Gridview
wants to have a minimum predefined width.
I want something that is smoothly rendered and each word is clickable
You search for WrappingHStack
https://github.com/dkk/WrappingHStack
you're able to split text to words and implement click function on each element