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

UIWebView issue

$
0
0

Hi everyone,

I have a problem with Xamarin.Forms.View and UIWebView

I created Xamarin.Forms.Shared project and I wrote this code:

`var stack = new StackLayout
{
Orientation = StackOrientation.Vertical,
Spacing = 10,
HorizontalOptions = LayoutOptions.FillAndExpand,
VerticalOptions = LayoutOptions.FillAndExpand

        };

var webView2 = new UIWebView();
webView2.LoadRequest(new NSUrlRequest(new NSUrl(url.Url), NSUrlRequestCachePolicy.ReturnCacheDataDoNotLoad, 90.0));
webView2.ScalesPageToFit = true;
webView2.AutoresizingMask = UIViewAutoresizing.FlexibleHeight | UIViewAutoresizing.FlexibleWidth;

stack.Children.Add(webView2);//Problem is here!!

        Content = stack;`

I've got error.

cannot convert from 'MonoTouch.UIKit.UIWebView' to 'Xamarin.Forms.View'

How can i solve ?

Thanks.


Viewing all articles
Browse latest Browse all 58056

Trending Articles



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