public override void ViewDidLoad() { base.ViewDidLoad (); // Intercept URL loading to handle native calls from browser webView.ShouldStartLoad += HandleShouldStartLoad; // Render the view from the type generated from RazorView.cshtml var model = new Model1 () { Text = "Text goes here" }; var template = new RazorView () { Model = model }; var page = template.GenerateString (); // Load the rendered HTML into the view with a base URL // that points to the root of the bundled Resources folder webView.LoadHtmlString (page, NSBundle.MainBundle.BundleUrl); // Perform any additional setup after loading the view, typically from a nib. }
public override void ViewDidLoad() { base.ViewDidLoad(); // Intercept URL loading to handle native calls from browser webView.ShouldStartLoad += HandleShouldStartLoad; // Render the view from the type generated from RazorView.cshtml var model = new Model1() { Text = "Text goes here" }; var template = new RazorView() { Model = model }; var page = template.GenerateString(); // Load the rendered HTML into the view with a base URL // that points to the root of the bundled Resources folder webView.LoadHtmlString(page, NSBundle.MainBundle.BundleUrl); // Perform any additional setup after loading the view, typically from a nib. }