Xamarin forms ios zoom renderer is not working , any help appreciated

public class CustomWebViewRenderer : ViewRenderer<CustomWebView, UIWebView>
{
protected override void OnElementChanged(ElementChangedEventArgs e)
{
base.OnElementChanged(e);

        if (Control == null)
        {
            SetNativeControl(new UIWebView());
        }
        if (e.OldElement != null)
        {
            // Cleanup
        }

        if (e.NewElement != null)
        {
            var customWebView = Element as CustomWebView;
            //string fileName = Path.Combine(NSBundle.MainBundle.BundlePath, string.Format("{0}",WebUtility.UrlEncode(customWebView.Uri)));
            Control.LoadRequest(new NSUrlRequest(new NSUrl(customWebView.Uri, false)));
            //Zooming enabled
            Control.ScalesPageToFit = true;    
        }
    }
}
Tagged:
Sign In or Register to comment.