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 cache it while putting it in the UIImageView. The download also needs to be able to be cancelled when I press a button.
Can anyone point me in the direction of something that can do this?
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
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.