Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Using NSURLConnection you are fetching the same data twice,waste of time because it can slow down the user interaction it loads the data twice ,consumes internet data.It is better to make a <strong>uiprogress based on timer and when the webview successfuly loaded the webpage it will show the uiprogress loading</strong>.in that case you can show a dynamic uiprogress everytime the webpage is loaded.. dont forget to create a uiprogress view and named it myProgressview and set it in file owner's.</p> <p>HERE IS THE CODE HOPE IT HELPS</p> <pre><code>@synthesize myProgressView; - (void)updateProgress:(NSTimer *)sender { //if the progress view is = 100% the progress stop if(myProgressView.progress==1.0) { [timer invalidate]; } else //if the progress view is&lt; 100% the progress increases myProgressView.progress+=0.5; } - (void)viewDidLoad { //this is the code used in order to load the site [super viewDidLoad]; NSString *urlAddress = @"http://www.playbuzz.org/"; myWebview.delegate = self; [myWebview loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:urlAddress]]]; } - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; // Dispose of any resources that can be recreated. } - (void)webViewDidFinishLoad:(UIWebView *)webView { ///timer for the progress view timer=[[NSTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(updateProgress:) userInfo:myProgressView repeats:YES]retain]; } - (void)dealloc { [myProgressView release]; [super dealloc]; } @end </code></pre> <blockquote> <p>this code and idea really helps me in solving my problem.</p> </blockquote>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload