开发者

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

开发者 https://www.devze.com 2022-12-30 13:36 出处:网络
I need to populate an array using data from a NSURL. How do I determine when th开发者_开发知识库e download from the URL has completed?You usually use NSURLConnection and then set its delegate to whate

I need to populate an array using data from a NSURL. How do I determine when th开发者_开发知识库e download from the URL has completed?


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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号