Member-only story
The Tricky WebView Bug: Fixing a Cut-Off Screen on iOS 16
A few weeks ago, I was polishing a feature in one of my iOS apps that used a WKWebView.
Everything looked flawless on iOS 17 and later scrolling was smooth, SnapKit constraints snapped perfectly, and even during screen rotation, from landscape to portrait the content resized exactly as expected.
Then… iOS 16 happened.
During testing on an older iPhone running iOS 16, I rotated the device from landscape to portrait and half the content disappeared.
The web view didn’t redraw correctly, leaving an awkwardly cut-off screen. The only way to recover was a full reload, which wasn’t an ideal user experience.
By the way, the WebView used in my application is this one.
