Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

iOS Page with WebView and Stacklayout with Buttons - Webview shows black content

$
0
0

Hey there,

We have dynamic Views, which gets generated during Runtime (content loaded from local storage, parsed to Xamarin Forms View Elements).
We have 3 possible schemas:
1. a page with a single webview
2. a page with a stacklayout which includes a WebView and a ScrollView with Buttons below
3. or a tabbed page which can have one of the 2 mentioned pages as content pages.

The WebView on iOS makes us real problems. In fact when draggin around the Html Content of the web view strange black areas appear. (Please see screenshots - the blue rectangle is the webview content - I used an overlay to ensure our customers privacy...)

We need the webview to align to the view and want to allow only vertical scrolling. So the width should stretch to the view without being able to scroll that way as can be seen in the attachments. We tried several Properties like disabling ScrollEnabled Property on the native iOS WebView.ScrollView control or setting the ScalesPageToFit to true. Also setting the Background Color Property to white (that the black part isn't that obvious) didn't work.

The strange thing is, if I reload the page the behavior of the WebView is like we intended it to be (Vertical Scrolling Bar is visible, no horizontal scrolling possible). I'm not sure where this comes from, but it seems as after layouting the page again (or something like that), the webview renders "correct", because sometimes when I switch orientation of the ios device and than switch back (e.g. Portrait to Landscape and back to Portrait) it works also.

I would appreciate any hint or advice, which will remove this strange artifact.

Thanks in advance!

(We are using Xamarin Forms 1.4)


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>