Note that there are some explanatory texts on larger screens.

plurals
  1. POUIActivityIndicatorView animation issue
    primarykey
    data
    text
    <p>I am using a <code>UIActivityIndicatorView</code> as an <code>IBOutlet</code>. I am trying to control it using <code>[activityView startAnimating]</code> and <code>[activityView stopAnimating]</code>.</p> <p>I have enabled 'Hides when stopped' and 'Animating' behaviors in XIB file.</p> <p>I want to start animate the spinner for several user actions inside the controller. But after the first <code>[activityView stopAnimating]</code> call it does not response to <code>[activityView startAnimating]</code> call again. </p> <p>That is mean the spinner is disappeared after the first <code>[activityView stopAnimating]</code> call.</p> <p>I tried <code>activeView.hidden = NO;</code> before the next <code>[activityView startAnimating]</code> call. But it does not work. </p> <p>Any idea about this issue?</p> <p><strong>Edited</strong></p> <p>After my controller loaded I do follow thing,</p> <pre><code>do { [self.activityIndicator startAnimating]; [UIApplication sharedApplication].networkActivityIndicatorVisible = YES; [webServiceCallOperation getResults]; [self.activityIndicator stopAnimating]; [UIApplication sharedApplication].networkActivityIndicatorVisible = NO; } while (![webServiceCallOperation isValideResponse] || [webServiceCallOperation isServerError]); </code></pre> <p>In the same controller I have a IBAction for a button click. </p> <pre><code>- (IBAction)tappedSearchButton:(id)sender { [self.activityIndicator startAnimating]; [UIApplication sharedApplication].networkActivityIndicatorVisible = YES; [self tappedSearchButtonAction]; [self.activityIndicator stopAnimating]; [UIApplication sharedApplication].networkActivityIndicatorVisible = NO; } </code></pre> <p>I noticed that the spinner not begin to animate just after the <code>[self.activityIndicator startAnimating];</code> call. Using <code>[self tappedSearchButtonAction];</code> I call to a web service and go to the search results view. The spinner begin to animate just before change the view. That's why I did not see it. But I suppose to animate it before web service call and should animate it while my web service call.</p> <p>Same behavior of the network activity indicator. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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