Avoiding scroll under status bar

Hey,

Firstly congrats on the launch. I’m interested in using Hotwire Native to replace our Flutter app and the new getting started documentation and process is fantastic, so thanks for that.

One issue we are running into on iOS is the WKWebview overscrolling under the status / navigation bar which looks a bit janky with our site content. What I’m looking for is a way to have the webview constrained to the safe area on the top. We don’t mind the transparent bottom either way.

Here’s a few screenshots of a vanilla Hotwire app exhibiting these behaviours, so i’m super curious to know how others are solving this?

I’m sure this is something silly I just don’t know about iOS (mostly Android experience).

Thanks,
-Ben

Hi there, it’s been a while, I hope you already managed to fix your issue.

This is what worked for me:

webView.translatesAutoresizingMaskIntoConstraints = false

I was executing this in the viewDidLoad of my UIViewController subclass.