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

Jason Awbrey jason at awbrey.net
Fri Dec 2 12:47:31 EST 2011


I'm not quite sure what you're asking, but I would first try assigning the
LoadFinished delegate **before** you start the LoadRequest()

On Thu, Dec 1, 2011 at 1:29 PM, ric3kg <rickgross at mac.com> wrote:

> 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.
> _______________________________________________
> MonoTouch mailing list
> MonoTouch at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/monotouch
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/monotouch/attachments/20111202/733655b1/attachment.html 


More information about the MonoTouch mailing list