On Nov 19, 2010, at 3:02 PM, cocoa-dev-requ...@lists.apple.com wrote:

On Fri, 19 Nov 2010 14:49:11 +0530, Tharindu Madushanka <tharindu...@gmail.com > said:
Hi,

I would like to make UIWebView content empty while other page is loading. I
tried loading [webview loadRequest:nil];

And also [webview loadHtmlString:@"<html></html>" baseUrl:nil];

Just before my [webview loadRequest:request]; method call.

Still I am having previous html page shown a very little time until next page is show. I load content for a button click.. so when I click the button
my webview still has  old content for a very small time.

How could I get rid of that.. can somebody kindly point some way..

I have not tried this myself, but keeping in mind that views are not redrawn until after your code finished running, I'd suggest trying delayed performance to give the view a chance to empty itself before doing the load request. m.




Something that I have used to clear a UIWebView when reopening with previous content is to execute the following command:

[webView stringByEvaluatingJavaScriptFromString :@"document.open();document.close()"];

This resulted in a blank view. Haven't tried it recently, so I don't know if there are any problems with current versions.


Bruce Turner
bmtur...@optonline.net



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to