Re: gif animation under a blocking
Re: gif animation under a blocking
- Subject: Re: gif animation under a blocking
- From: "Koshiro MITSUYA" <email@hidden>
- Date: Fri, 18 May 2007 17:33:40 +0900
Dear Andrew,
OK, I will try to write an asynchronous connection.
Thank you very much for you advice.
Koshiro
2007/5/18, Andrew Farmer <email@hidden>:
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
_______________________________________________
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