iOS - Asynchronous Image Downloading

后端 未结 2 818
猫巷女王i
猫巷女王i 2021-01-17 01:21

I am writing an app which is going to be displaying images found on my server in a UIImageView.

I need something that will asynchronously download the image and cach

相关标签:
2条回答
  • 2021-01-17 02:01

    In the old times the framework for that was ASIHTTPRequest but is an abandoned project now. This https://github.com/AFNetworking/AFNetworking seems to be popular now.

    0 讨论(0)
  • 2021-01-17 02:22

    Use the performSelectorInBackground:withObject: - method from NSObject ;)

    Advise: The updating of the view must run on the main thread!

    http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/nsobject_Class/Reference/Reference.html

    0 讨论(0)
提交回复
热议问题