[MonoTouch] WebView.LoadFinished fires before view is loaded?

ric3kg rickgross at mac.com
Thu Dec 1 14:29:23 EST 2011


I'm trying to load a webview then create a pdf of the contents. But I can't
get passed the LoadFinished event firing before the view has loaded. Any
help would be much appreciated. My code:

UIWebView webView = new UIWebView();
string localFile = Path.Combine(store.localPath,"test.htm");
webView.LoadRequest(new NSUrlRequest (new NSUrl(localFile, false))); //new
NSUrl ("test.htm")
webView.Frame = new RectangleF (0f, 0f, 1024f, 768f);
webView.LoadFinished += delegate {
	LoadComplete(webView);
};
this.mainViewController.View.AddSubview(webView);
this.window.BringSubviewToFront(webView);

Thanks,
Rick

--
View this message in context: http://monotouch.2284126.n4.nabble.com/WebView-LoadFinished-fires-before-view-is-loaded-tp4130095p4130095.html
Sent from the MonoTouch mailing list archive at Nabble.com.


More information about the MonoTouch mailing list