Note that there are some explanatory texts on larger screens.

plurals
  1. PODismissing the UIActivityIndicatorView on Background touch
    text
    copied!<p>I am fetching the data from the web service and during the the data fetch I am displaying a <code>UIAcitivityIndicatorView</code> on the screen. This indicator is in <code>UIAlertView</code></p> <pre><code>UIAlertView *waitAlert = [[UIAlertView alloc] initWithTitle:@"Please Wait...." message:nil delegate:self cancelButtonTitle:nil otherButtonTitles: nil]; [waitAlert show]; indicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge]; // Adjust the indicator so it is up a few pixels from the bottom of the alert indicator.center = CGPointMake(waitAlert.bounds.size.width / 2, waitAlert.bounds.size.height - 50); [waitAlert addSubview:indicator]; NSURL *url = [NSURL URLWithString:URLString]; NSURLRequest *urlRequest = [NSURLRequest requestWithURL:url]; NSOperationQueue *queue = [[NSOperationQueue alloc] init]; [NSThread detachNewThreadSelector:@selector(startAnimation) toTarget:self withObject:self.view]; [NSURLConnection sendAsynchronousRequest:urlRequest queue:queue completionHandler:^(NSURLResponse *response, NSData *data, NSError *error) { // Data to populate the tableview [[NSOperationQueue mainQueue] addOperationWithBlock:^ { [self.tableView1 reloadData]; //Stop the UIActivitiyIndicatorView [self stopLoading]; }]; }]; </code></pre> <p>I am able to dismiss that successfully when the data loads successfully but I want to dismiss the <code>UIActivityIndicatorView</code> if someone touches on the rest of the screen during the data load from the web service. Any help will be appreciated.</p>
 

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