Showing Accurate Progress In UIProgressView While Downloading Images in iphone

后端 未结 4 1957
遥遥无期
遥遥无期 2021-01-03 14:46

I have four urls which consists images... I\'m downloding those images and placing them into documents folder..

here is my code..

4条回答
  •  臣服心动
    2021-01-03 15:07

    Your call to dataWithContentsOfURL is synchronous, meaning you don't get updates as the download is in process.

    You can use a library like AFNetworking (https://github.com/AFNetworking/AFNetworking) which has callbacks to the progress of the download.

提交回复
热议问题