NSURLConnectionDownloadDelegate file issue

前端 未结 4 512
清歌不尽
清歌不尽 2021-02-08 03:07

Now that 5.0 is launched and we can discuss it without breaching Apple\'s NDA, I have an issue with the new version of NSURLConnection. This has a new delegate, NSURLConne

4条回答
  •  鱼传尺愫
    2021-02-08 04:01

    Apparently only for use with Newsstand apps. This guy might have found a work around:

    http://adamernst.com/post/18948400652/a-replacement-for-nsurlconnectiondownloaddelegate

    Alternatively, just use NSURLConnection. But heads up if you implement the NSURLDownloadDelegate methods, they appear to override the standard NSURLConnection delegate methods. If it's the handy didWriteData: method of NSURLConnectionDownloadDelegate that you want, e.g. to update a UIProgressView, you can achieve the same by grabbing the total file size from the http response, and by using the didReceiveData: method of NSURLConnection.

提交回复
热议问题