https://kotlinlang.org logo
l

Landry Norris

12/29/2022, 2:18 PM
Is the forEachGesture modifier not completely implemented currently? I’m trying to convert a simple drawing feature to iOS Compose (already have the Android version), but it seems like
pressed
is always set to false, which messes up the press/drag/release cycle. The lower-level parts of Compose have typically worked well, and it seems like this would have to work for the higher level UI elements to work properly.
d

Dima Avdeev

12/29/2022, 3:04 PM
Yes, for now it's not fully implemented yet. As multi touch and gestures too.
l

Landry Norris

12/29/2022, 3:06 PM
In that case, I’ll just leave my changes on a branch until it’s implemented in compose-jb. Where is touch gesture support in terms of priority? I see that UIKit interop was just drafted.
d

Dima Avdeev

12/29/2022, 3:13 PM
UIKit interop and gestures have the same priority. But, UIKit interop is a big feature and may take a long time to implement. I think, gestures will be implemented by another developer. And maybe earlier.
l

Landry Norris

12/29/2022, 3:15 PM
I’d imagine UIKit interop will be quite the task, but it would be very helpful once done.
I looked over the draft a little bit. I noticed that y’all went the route of hybrid composition, as opposed to drawing the UIViews directly into the canvas, like on Android. Was there a blocker to drawing directly into the Canvas (I remember when I tried, I couldn’t easily get a redraw trigger working).
d

Dima Avdeev

12/29/2022, 3:19 PM
We have a draft that already works without Canvas. UIKit view draws in concrete rectangle. But this approach has visual problems. For now, I am researching how to render UIKit widgets right in to Metal texture near Compose nodes.
24 Views