• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [iPhone] Make UIWebView content empty before loading next page
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [iPhone] Make UIWebView content empty before loading next page


  • Subject: Re: [iPhone] Make UIWebView content empty before loading next page
  • From: Tharindu Madushanka <email@hidden>
  • Date: Sat, 20 Nov 2010 08:22:27 +0530

Hi,

 [webView stringByEvaluatingJavaScriptFromString:@"document.open();document.close()"];
Solution Works as Bruce said :)

Thanks a lot for all.

Tharindu.


On Sat, Nov 20, 2010 at 6:51 AM, Bruce Turner <email@hidden>wrote:

>
> On Nov 19, 2010, at 3:02 PM, email@hidden wrote:
>
>  On Fri, 19 Nov 2010 14:49:11 +0530, Tharindu Madushanka <
>> email@hidden> 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
> email@hidden
>
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> 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:
>
> This email sent to email@hidden
>
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: [iPhone] Make UIWebView content empty before loading next page
      • From: Jack Carbaugh <email@hidden>
References: 
 >Re: [iPhone] Make UIWebView content empty before loading next page (From: Bruce Turner <email@hidden>)

  • Prev by Date: Re: unit test exit's abnormally with code 5
  • Next by Date: Re: [iPhone] Make UIWebView content empty before loading next page
  • Previous by thread: Re: [iPhone] Make UIWebView content empty before loading next page
  • Next by thread: Re: [iPhone] Make UIWebView content empty before loading next page
  • Index(es):
    • Date
    • Thread