How to make NSURLConnection file download work?

后端 未结 3 2007
醉梦人生
醉梦人生 2021-01-25 04:12

I have a ViewController declared as:

@interface DownloadViewController : UIViewController 
           
<         


        
3条回答
  •  执笔经年
    2021-01-25 04:52

    If you're having problems, you could consider using the well regarded ASIHTTPRequest library to manage your download. It takes care of everything for you.

    For example, just 2 lines will do it.

    ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];
    [request setDownloadDestinationPath:fullPathOfWhereToStoreFile];
    

提交回复
热议问题