Reputation: 21
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
Reputation: 6427
there is delegate method will be called when all the data from url is download.- (void)connectionDidFinishLoading:(NSURLConnection *)connection {}
Upvotes: 0
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