I'm working on mobile application development using Xamarin.Forms (PCL). I am using Xamarin WebView to render some web view contents and i'm getting performance issue in iOS application. So, i have analyzed and found that the WKWebView will improve the performance.
How can i use WKWebView in Xamarin Forms WebView instead of UIWebView ? Is there any custom rendering available to do this?
Yes, You can create custom renderer using WKWebView.
Please have a look below and this is ios renderer class of WebView:
[assembly: ExportRenderer(typeof(CustomWebView), typeof(CustomWebViewRenderer))]
namespace DemoApp.iOS.Renderers
{
public class CustomWebViewRenderer : ViewRenderer<CustomWebView, WKWebView>
{
protected override void OnElementChanged(ElementChangedEventArgs<CustomWebView> e)
{
base.OnElementChanged(e);
}
}
}
for more information click here .
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With