Skip to content

Commit bf5b3bf

Browse files
committed
Set scrollView content inset to never. This allows the scroll view to acces the safe area
1 parent 209fac7 commit bf5b3bf

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

  • webview/src/iosMain/kotlin/com/multiplatform/webview/web

webview/src/iosMain/kotlin/com/multiplatform/webview/web/WebView.ios.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,12 @@ fun IOSWebView(
151151
scrollEnabled = it.scrollEnabled
152152
showsHorizontalScrollIndicator = it.showHorizontalScrollIndicator
153153
showsVerticalScrollIndicator = it.showVerticalScrollIndicator
154+
if (
155+
platform.UIKit.UIDevice.currentDevice.systemVersion
156+
.toDouble() >= 11.0
157+
) {
158+
contentInsetAdjustmentBehavior = platform.UIKit.UIScrollViewContentInsetAdjustmentBehavior.UIScrollViewContentInsetAdjustmentNever
159+
}
154160
}
155161
}
156162

0 commit comments

Comments
 (0)