• 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: gif animation under a blocking
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gif animation under a blocking


  • Subject: Re: gif animation under a blocking
  • From: Andrew Farmer <email@hidden>
  • Date: Thu, 17 May 2007 23:04:13 -0700

On 17 May 07, at 22:33, Koshiro MITSUYA wrote:
I am trying to have a gif image animating during a HTTP session
between a server.
However, the animation stopped when I called NSURLConnection because
(maybe) the connection is blocking the process.

<... snip...>

receivedData = [NSURLConnection sendSynchronousRequest:theRequest
returningResponse:&response error:&error];

sendSynchronousRequest is a blocking operation - it doesn't return until the remote server is done responding. As such, it'll block the UI until it's done, preventing other things from happening (like the image animating). Run it on a separate thread or set up an asynchronous connection using connectionWithRequest:delegate: and an appropriate delegate.


Get used to using delegates. They're a common Cocoa idiom that you'll have to learn sooner or later.
_______________________________________________


Cocoa-dev mailing list (email@hidden)

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: gif animation under a blocking
      • From: "Koshiro MITSUYA" <email@hidden>
References: 
 >gif animation under a blocking (From: "Koshiro MITSUYA" <email@hidden>)

  • Prev by Date: gif animation under a blocking
  • Next by Date: Re: NSTableView clicked row
  • Previous by thread: gif animation under a blocking
  • Next by thread: Re: gif animation under a blocking
  • Index(es):
    • Date
    • Thread