Ive tried all the stack overflow suggestions and none of them work. The only way to make it work and feel that its reliable solution is to create new html files in the temp directory (with a different directory name - Guid works best) every time and copy all the related images, scripts, css, each time to this temp directory.
Then open it using the NSUrlRequest object
string tempdir = Path.Combine(UIController.Common.DataFolder,System.Guid.NewGuid().ToString ()); Directory.CreateDirectory (tempdir); //-- create your html on the tempdirectory here //-- copy all the images, and all the css, and js files UIWebView wv = new UIWebView(new RectangleF(30,30,480,680)); NSUrlRequest req = new NSUrlRequest(new NSUrl (Path.Combine (tempdir,"default.html"), false),NSUrlRequestCachePolicy.ReloadRevalidatingCacheData,10); wv.LoadFinished += delegate(object sender1, EventArgs e1) { //delete the tempdirectory Directory.Delete(tempdir); };
John gavilan
source share