Is there an equivalent of `UIKitInteropProperties`...
# compose-ios
g
Is there an equivalent of
UIKitInteropProperties
for
ComposeUIViewController
? The touch handling changes in 1.7 seem to have broken scrolling of SwiftUI `ScrollView`s that contain `ComposeUIViewController`s, and I don’t see any new properties/functions in
ComposeUIViewControllerConfiguration
that would allow me to revert the new behavior.
An example from my app of code that was working pre-1.7 and stopped working with 1.7:
Copy code
ScrollView {
    ComposeViewControllerHere().frame(height: height)
}
a
Hi! We're working on further improving the handling of Interop gestures. To handle touches within the ComposeUIViewController, we're using a custom
CMPGestureRecognizer
. There is no direct access to this class, but the Obj-C runtime will help. So as a workaround - you can prioritise the scroll gesture recogniser in front of
CMPGestureRecognizer
to make the scroll working.
👍 1
gratitude thank you 1
m
@Andrei Salavei, how would you implement the workaround to prioritise the scroll? I'm having the same issue following this approach:
Copy code
ScrollView {
    VStack {
        cmpView

        swiftView1

        swiftView2

        // ...
    }
}
It's currently getting on the way because we have two CMP views that take most of the initial vertical space of the scroll view, so unless you know you have to drag from the outside of their bounds nothing happens 😞
a
Try to use CMP 1.8 (currently there is the RC available) - it improves significantly the situation with interop touches, as well as with scroll.
m
Oh! Will give it a go in the next couple of hours and report back 🙏
I'm already in 1.8.0 (androidx.compose.xxx), the non-RC stable version. Did you mean 1.9.0-alpha01 by any chance?
Silly me
Of course, it's the jetbrains one org.jetbrains.compose 🤦
Indeed, that solved it! Thanks @Andrei Salavei 😄
🎉 1
I'm experiencing this now, not sure if it's related with the Compose update!