I am working on a iOS app using Xamarin iOS and I have a webView that loads local html, However the webView takes up the entire screen so there is no place to put a back button.
here's my load localhtml code:
using CoreGraphics;
using Foundation;
using System;
using System.CodeDom.Compiler;
using System.IO;
using UIKit;
namespace AppName
{
partial class View : UIViewController{
public View(IntPtr handle) : base(handle)
{
}
public override void ViewDidLoad()
{
base.ViewDidLoad();
// Perform any additional setup after loading the view, typically from a nib.
var webView = new UIWebView(new CGRect(0, 20, View.Frame.Width, View.Frame.Height -20));
View.AddSubview(webView);
// Method 2 using LoadRequest
string fileName = "Content/local.html"; // remember case-sensitive
string localHtmlUrl = Path.Combine(NSBundle.MainBundle.BundlePath, fileName);
webView.LoadRequest(new NSUrlRequest(new NSUrl(localHtmlUrl, false)));
webView.ScalesPageToFit = false;
}
public override void DidReceiveMemoryWarning()
{
base.DidReceiveMemoryWarning();
// Release any cached data, images, etc that aren't in use.
}
}
}
what am I doing wrong?