Hi, i am currently trying out compose 1.10.0-beta0...
# compose-ios
f
Hi, i am currently trying out compose 1.10.0-beta01 and stumbled on this changelog. I am trying to use autoresize uikit without assigning the default value. But it does not work. Here is the code snippet :
Copy code
UIKitView(
    factory = {
        val webView =
            wkwebviewInstance(
                url = url(),
                token = token,
                onSizeChange = {
                },
                backgroundColor = backgroundColor,
            )
        webView.navigationDelegate = coord
        webView.UIDelegate = coord
        webView
    },
    modifier =
        Modifier
            .fillMaxWidth()
            .wrapContentHeight()
            .background(Color.Transparent),
    update = { webView ->
        webView.backgroundColor = backgroundColor.toUiColor()
        webView.loadHTMLString(url(), null)
    },
    properties = UIKitInteropProperties(placedAsOverlay = true),
)
a
Unlike several UI components, like UILabel, UIButton of SwiftUI view, WKWebView as a component does not have self-sizing capabilities - you have to specify its size when using it.
1
f
Ahh i see, thank you