XMRemoteImage is a simple project that demonstrates a way to update an NSImage from a high resolution graphic on the web.
The project includes the
XMImageDownloader class, which is an
NSObject subclass with the designated initializer:
- (id) initWithProxyImagePath:(NSString *)proxyPath remoteImagePath:(NSString *)remotePath targetKey:(NSString *)key
The goal of this class is to save space in your application bundle by allowing you to include a low res proxy image, which can be updated at runtime from a hi res image at a web url.
XMImageDownloader downloads images on a separate thread, then sends an
NSNotification when the download is complete.
March 2nd 2009: Updated to support multiple asynchronous downloads.