-
update version check to make #if work for iOS >= 4
-
Update README.md
-
Contributed by https://github.com/mystcolor
-
…better responsiveness (fix #18) This new optimization is currently disabled by default so you can test it and give us feedback. To enable it, add #define ENABLE_SDWEBIMAGE_DECODER and to not forget to add SDWebImageDecoder class to your projet. Thanks to Adam Jernst (https://github.com/adamjernst) and James Tang (https://github.com/mystcolor) for this great optimization. See https://github.com/rs/SDWebImage/pull/18 for more info.
-
Fixed a potential crash when the delegate retainCount = 1, which means th
-
… prio and retry failed) to an options: parameter
-
…ate is only retained by the SDWebImageManager and the delegate's dealloc method has a structure like the code below. - (void)dealloc { [manager cancelForDelegate:self]; [super dealloc]; }
-
…do not prevent memory caching (fix: #24)
-
Added UIButton+WebCache category
-
The -cancelForDelegate: method was working for downloads but not local cache checks. Add some new machinery to keep track of pending cache requests and only message the delegate if it hasn't since requested cancellation.
-
Low priority download mode
-
As showing/hiding the network activity indicator could conflict with your own code (i.e. the lib may hide the indicator when your code would still do some network stuff), the show/hide of the indicator isn't performed by the lib directly but SDWebImageDownloadStartNotification and SDWebImageDownloadStopNotification notifications are posted instead. This lets you handle the indicator visiblity by yourself. If you're lazy, you can use the SDNetworkActivityIndicator library (http://github.com/rs/SDNetworkActivityIndicator) to handle it automatically. Once added to your project, all you have to do is to import this lib in addition to the SDWebImage lib. Note that you should then use SDNetworkActivityIndicator for all your network status indicator visibility changes in your code if you don't want conflicts to happen.
-
…ing the main runloop when a lot of cache queries are performed at the same time
-
…ge (or nil if no placeholder) This is the recommanded way clear an image for reuse (as a UITableViewCell for instance). Calling setImageWithURL: with nil URL will have the effect to cancel an eventual currently in progress download of a thumbnail for this UIImageView. Affecting the image property directly won't have this effect and may lead to image being re-affected once download is completed.
-
This saves CPU and memory in all cases and alpha channel / image clearness if orignal format was PNG or GIF.
-
…-on to understand why) I finally found the reason behind the download not started while UITableView is manipulated: the default NSURLConnection runloop mode. Its default mode is NSEventTrackingRunLoopMode which is interrupted by UI events. Changing default NSURLConnection runloop mode to NSRunLoopCommonModes just fix this good old responsiveness issue. I thus decided to replace the current NSOperation based implementation by this finding, as NSOperation is far more expensive than simple async connections. Additionally, moving aways from NSOperation here fix an odd lagging issue with iOS 4, an issue I can't explain at the moment. Note that `SDWebImageDownloader`'s `setMaxConcurrentDownloads:` method is now a no-op as I didn't implemented the NSOperation queuing system with async connections. I don't think it still necessary as thread-less async connectaions are very lightweight. If you think there is a real need of this, I may reconsider and implement it in the future. In the meantime, this method does nothing and its usage is declared as deprecated.