https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
s

Suryabhan Yadav

03/11/2024, 11:18 AM
How can i set dynamic height in webview .
Copy code
webView.frame.size.height // this works in swift UI but in kotlin frame is of type CValue<CGRect>. And size is present in CGRect.
in iOS where webview is WkWebview.
a

Andrei Salavei

03/11/2024, 3:19 PM
Copy code
val rect = this.bounds.useContents {
    CGRectMake(0.0, 0.0, this.size.width / 2, this.size.height / 2)
}
webView.setFrame(rect)
5 Views