• 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: Showing activity indicator during data download
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Showing activity indicator during data download


  • Subject: Re: Showing activity indicator during data download
  • From: DKJ <email@hidden>
  • Date: Thu, 29 Oct 2009 01:36:38 -0700

On 2009-10-29, at 0:30 , DKJ wrote:

- (IBAction)updateButton:(id)sender
{
[UIApplication sharedApplication].networkActivityIndicatorVisible = YES;
[downloadIndicator startAnimating];


  [[DataManager sharedDataManager] updateDataFiles];

[downloadIndicator stopAnimating];
[UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
}


I replaced the line:

   [downloadIndicator startAnimating];

with this:

NSInvocationOperation *theOp = [[[NSInvocationOperation alloc] initWithTarget:downloadIndicator
selector:@selector(startAnimating) object:nil] autorelease];
NSOperationQueue *theQ = [[[NSOperationQueue alloc] init] autorelease];
[theQ addOperation:theOp];


and now it works just the way I want it to.

But am I taking a sledgehammer to a fly? Or have I found (quite by accident) the best way to do it?

dkj
_______________________________________________

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: Showing activity indicator during data download
      • From: Alastair Houghton <email@hidden>
References: 
 >Showing activity indicator during data download (From: DKJ <email@hidden>)

  • Prev by Date: how to filter available fonts for my application?
  • Next by Date: Re: Cocoa replacement for Carbon CompositeIconRef() for Snow Leopard 64-bit apps?
  • Previous by thread: Showing activity indicator during data download
  • Next by thread: Re: Showing activity indicator during data download
  • Index(es):
    • Date
    • Thread