How to implement a webview in Xamarin iOS.

Xamarin.iOS
img_xamarin

Web View, on the other hand, is a handy component to load web content. In some cases, you want to display a single web page locally in your app or let users access external web pages within your app. You can simply embed the Web View object in your app and send it a request to load the web content.

12a

We just add a single web view in our application, when this tutorial finish it will look like:

Let’s Start:
Create a new solution, select C#->iOS->Unified API->iPhone and Single View Application, give it name “SampleWebView.iOS”.

12b

Now go to storyboard file and drag and drop WebView control from toolbox. And give name of WebView control as “webView”.

12c

Now go to the SampleWebView.iOSViewController.cs file and write below code into ViewDidLoad method:

Now build and run the app and when application opens it automatically transfer to google.com in WebView.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">