UIWebView acts weird on iOS9

I have a UIWebView that displays an HTML page that it receives from the server as NSData.

Starting with iOS 9 the UIWebView sometimes shows the HTML as usual and sometimes it renders the HTML as a very small page.

Is this a known issue on iOS9?

Replies

I've been expeirencing weird behaviour on iOS9 as well. When trying to load local iOS9 pages, sometimes the pages load, sometimes they just appears as a blank screen. The pageLoaded function gets called in these instances as well.


The same code works fine on iOS 8.

This seems to occur because of some regression in beta4 whereby if you don't specify the width=device-width property in the viewport meta tag pages are rendered in this way.


This all looks way broken on beta4

I posted about some viewport issues here: https://forums.developer.apple.com/thread/13510


The viewport is incorrectly set to display all elements in the document, rather than the specified viewport.


I found I could get things working properly with initial-scale to 1.00001 and have no width set (probably - still testing).

<meta name="viewport" content="initial-scale=1.0001, minimum-scale=1.0001, maximum-scale=1.0001, user-scalable=no"/>


I've logged a bug report.


More details in the post linked to above.