Can't explain this WKWebView behavior

#1

Hi all,

When I was working on the bronze challenge, the app rendered the mobile version of the webview just fine when I programmatically created the webView. However, when I dragged a webView into the WebViewController in interface builder, the resulting web page rendered like this, with half of the page cut off:

Anyone have any ideas why? I feel like it is an aspect fill setting in IB, but nothing that I fiddled with seemed to work. Also, why does it make a difference in how the webpage is rendered?

Thanks!
Mike

#3

However, when I dragged a webView into the WebViewController in interface builder, the resulting web page rendered like this, with half of the page cut off

I just implemented what you describe–although it required more changes than simply dragging a WebView onto the WebViewController–and the BNR home page displays correctly for me. Does the same thing happen to you for other URL’s?

What Simulator or Device did you use? Alright, I see that when I hover my cursor over your image, it says iPhone 6s simulator–which is the Simulator I used.

Post the code for your WebViewController.