is there a way to measure the height of compose vi...
# compose-ios
k
is there a way to measure the height of compose view and expand the size of its wrapping swiftuiview based on that? i want to delegate the scrolling to uiscrollview instead of compose native scrolling
a
i want to delegate the scrolling to uiscrollview instead of compose native scrolling
May I ask why it's needed?
k
its a weird usecase, where we have a compose viewcontroller integrated in swift ui and we need the swift ui scrollbars and scrolledge apperance
a
Ah, okay. Currently we're not supporting self-sizing of Compose views in UIKit/SwiftUI, but it's in our plans. If you know what you're doing - it's totally possible to get the preferred size during the layout phase of Compose and propagate these numbers to the custom constraints of ComposeUIViewController's root view. However, having a huge Compose container that larger that the screen may cause issues with RAM usage - it creates a Metal buffers which are pretty heavy. Also, I could only say that it's 100% possible to implement the same effects (scrollbar and blurred effect) using Compose and skia shaders.
k
ill try out skia, i am currently using
Modifier.layout{}
for it and its working fine but something out of the box would be really helpful. Thanks
👍 1