Florent
Florent

Reputation: 21

iPhone: How to Determine When a Download from a URL has Completed

I need to populate an array using data from a NSURL. How do I determine when the download from the URL has completed?

Upvotes: 0

Views: 275

Answers (2)

SachinVsSachin
SachinVsSachin

Reputation: 6427

there is delegate method will be called when all the data from url is download.- (void)connectionDidFinishLoading:(NSURLConnection *)connection {}

Upvotes: 0

TechZen
TechZen

Reputation: 64428

You usually use NSURLConnection and then set its delegate to whatever object controls the download. When NSURLConnection finishes it sends connectionDidFinishLoading: to the delegate to signal completion.

See the URL System Programming Guide.

Upvotes: 1

Related Questions