forked from kean/DFImageManager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCHANGES.txt
252 lines (217 loc) · 24.8 KB
/
CHANGES.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
DFImageManager 0.0.18
=====================
This release focuses on stability. It ensures the future growth through the addition of essential unit tests and a test environment with multiple mock and stub objects. The primary goal of unit tests in this project is to ensure isolation of all the dependencies, which is achieved using dependency injection.
- Add unit tests to ensure future grown; improve documentation.
- DFImageManager now calls a completion block synchronously if the requested image was available in memory cache and the request was made from the main thread. It prevents 'flashes' when you reload the UI and resubmit image requests. It also improves performance by reducing the pressure on DFImageManager.
- DFURLImageFetcher now has a more flexible designated initializer -initWithSession:(NSURLSession *)session sessionDelegate:(id<DFURLImageFetcherSessionDelegate>)sessionDelegate
- Add DFURLImageFetcherSessionDelegate protocol that should be implemented in your classes if you initialize DFURLImageFetcher with NSURLSession object. This protocol replaced more strict DFURLSessionOperationDelegate protocol.
- Fix rare memory warnings under pressure on outdated devices. NSCache+DFImageManager has a sightly more strict totalCostLimit. Remove animations on DFImageView when it is reused.
- Make -costForImage: method of DFImageCache public.
- Fix DFImageManagerConfiguration copyWithZone: method, maximumConcurrentPreheatingRequests and processingQueue properties are now copied correctly.
- DFImageManager now copies image request before passing it to -canonicalRequestForRequest: method of the fetcher. Fetcher is no longer responsible for copying it and it can now modify the given request.
- DFImageRequestOptions now longer overwrites default options in -initWithOptions: method.
- DFImageRequest now uses [self class] to create a copy which simplifies subclassing.
- Mark DFImageRequestOptions -init method as a NS_DESIGNATED_INITIALIZER, mark designated initializer on subclasses too.
- Add name property to DFImageManager
DFImageManager 0.0.17
=====================
* Performance improvements
* Add progressHandler to DFImageRequestOptions
* Improvements in memory caching:
* DFImageFetching protocol changes. Rename -isRequestEquivalent:toRequest: method to -isRequestFetchEquivalent:toRequest. Add -isRequestCacheEquivalent:toRequest: method for comparing requests for memory-cached images.
* Add DFImageRequestCachePolicy enum that describes the request cache policy that applies to memory caching. Add memoryCachePolicy property to DFImageRequestOptions. Users can now reload images ignoring memory cache.
* DFImageManager now can’t use cached images stored by other managers if they share the same cache instance (which makes all the sense)
* Add DFCachedImage class. Slightly changed and more flexible expiration mechanism in DFImageCache. Each cached image now might have a different expiration age, which is configured via a new expirationAge property of the DFImageRequestOptions; remove maximumEntryAge property from DFImageCache.
* Add DFURLImageFetcherDelegate protocol for DFURLImageFetcher customization, remove public methods that were responsible for that. Users can now customize DFURLImageFetcher without subclassing it.
* Reworked DFCompositeImageFetchOperation (previous name was DFCompositeImageRequest). It now gives users full access to the underlying requests and their results. Add startTime and elapsedTime properties. Add new methods and properties that are used for handling the obsolete requests. And more.
* DFImageView is now a UIImageView subclass. It’s easier to use and it doesn’t have any unnecessary functionality that it had before.
* DFImageView now automatically retries image requests in certain conditions, controlled using new allowsAutoRetries property
* Add DFImageContainerView class that implements all the functionality that was removed from DFImageView. The DFImageContainerView works in conjunctions with DFImageView.
* Add UIImageView+DFImageManager category that adds some basic image fetching functionality to UIImageView
* Add DFImageFetchOperation that wraps DFImageManager API to give clients a power of NSOperation and NSOperationQueue
* Add DFNetworkReachability class
* DFPhotosKitImageFetchOperation now cancels requests started using PHImageManager
* Add DFALAsset class, DFAssetsLibraryImageFetcher now supports DFALAsset class, for more info see DFAssetsLibraryImageFetcher docs.
DFImageManager 0.0.16
=====================
* Rename all existing protocols according to Coding Guidelines for Cocoa (<DFImageManager> -> <DFImageManaging>)
* DFImageManager now uses term ‘resource’ instead of ‘asset’. It prevents confusion with PHImageManager methods
* Add allowsClipping instead of DFImageProcessingClipsToBoundsKey that was put into userInfo dictionary.
* Improvements in URL fetching:
* DFURLImageFetcher is now implemented using a life cycle of a URL session with custom delegate (instead of system provided delegate). Users now initialize DFURLImageFetcher with a session configuration instead of session. DFURLImageFetcher then creates instance of NSURLSession and sets itself as a session delegate. DFURLSessionOperation was also changed. Now it doesn’t create a NSURLSessionDataTask by itself but asks its delegate (new DFURLSessionOperationDelegate protocol) to do that, the delegate is supposed to provide a completion handler for a task. DFURLImageFetcher now also has an initializer with a delegate and a delegateQueue so that the users of the class can provide their own NSURLSessionDelegate and DFURLSessionOperationDelegate implementation.
* Users can now changed the set of the schemes supported by DFURLImageFetcher. It might be necessary in case there are any custom protocols supported by NSURLSession that DFURLImageFetcher uses.
* DFURLImageFetcher now supports ‘data’ scheme.
* Add DFURLImageDeserializer and DFHTTPURLImageDeserializer classes. HTTP deserializer now performs some additional response validation based on the values of new acceptableStatusCodes and acceptableContentTypes (accepts everything by default) properties. Remove -isValidResponse:error: method from DFURLResponseDeserializing protocol, because it should be enforced by the protocol and it wasn’t useful for clients.
* DFURLImageFetcher now has public factory methods for creating URL requests, operations and response deserializers.
* Improvementents in DFAssetsLibraryImageFetcher:
* Add DFALAssetImageSizeFullsize and DFALAssetImageSizeAspectRatioThumbnail
* Add DFAssetsLibraryImageRequestOptions
* Add DFALAssetVersion
* Add documentation for the most important DFImageManager classes.
DFImageManager 0.0.15
=====================
DFImageManager 0.0.15 is a huge release packed with great features and improvements. It also features a new DFImageManagerKit target that builds Cocoa Touch Framework (iOS 8.0+) and a Swift Playground that can used to experiment with DFImageManagerKit classes.
* Users can now provide request options that are specific for a concrete image fetcher:
* Add DFURLImageRequestOptions that are supported by DFURLImageFetcher. It allows users to change the request cache policy for a specific request. More options will be added in the future.
* Add DFPhotosKitImageRequestOptions that are supported by DFPhotosKitImageFetcher. It allows users to have more options over Photos Kit fetching
* Add -canonicalRequestForRequest: method in <DFImageFetcher> protocol which allows users to validate and modify requests before they ever reach other <DFImageFetcher> methods.
* Major improvements in image processing:
* Add DFProcessingImageFetcher class that supports instances of a new DFProcessingInput class. DFProcessingImageFetcher is initialized with an object conforming to <DFImageProcessor> protocol and uses its methods to process the input images and compare the requests with regard to image processing
* From the initial DFImageManager version it always guaranteed that it will create a single operation for multiple image requests that are considered equivalent. But those requests might have different image processing options like target size and content mode (or they might be the same, which is common when preheating images). Those operations are very CPU intensive. DFImageManager now guarantees that the same processing operations are executed exactly once for the requests with the same processing options.
* DFImageManager now cancels processing for cancelled requests
* DFImageManager can now preheat images for the same asset but with multiple different processing options
* Add +imageWithImage:cornerRadius: method to DFImageUtilities
* Add +croppedImageWithImage:aspectFillPixelSize: method to DFImageUtilities
* Add DFImageProcessingCornerRadiusKey and DFImageProcessingClipsToBoundsKey options that should be put info DFImageRequest userInfo. The first options allows users to draw image with rounded corners, the second: clip image so that it’s aspect ratio is the same as target size aspect ratio (only works for DFImageContentModeAspectFill).
* Multiple improvements in memory caching:
* The <DFImageCache> protocol no longer operates on instances of DFImageRequest class and it no longer has to construct cache keys itself. All <DFImageCache> methods now take general purpose id<NSCopying> objects as a cache keys. DFImageManager is now responsible for providing those keys and it uses existing _DFImageRequestKey class to do just that (see _DFImageRequestKey description for more info).
* Add -removeAllObjects method to <DFImageCache>
* Add DFImageCache class that implements <DFImageCache> protocol, DFImageProcessor no longer implements DFImageCache protocol. Move NSCache+DFImageManager category to a separate file.
* Add maximumEntryAge property to DFImageCache class
* Remove <DFImageAsset> protocol, because it's assetID method is no longer used (reuse of operations and memory caching is now implemented using _DFImageRequestKey class and isRequestEquivalent:toRequest: methods).
* <DFImageFetcher> protocol now has a single startOperationWithRequest:completion: method instead of two separate methods that were used before for creating and starting operations. The returned operation (NSOperation) is no longer required to adopt <DFImageManagerOperation> protocol, which now makes it easier to implement those operations and to makes it possible to use existing operation without subclassing. DFImageManager no longer uses the completion block of the returned operation. Remove <DFImageManagerOperation> protocol and _DFURLImageFetcherOperation which are no longer used.
* Change main image manager protocols. There is <DFImageManagerCore> protocol and <DFImageManager> that inherits <DFImageManagerCore>, that’s it.
* Add requestImageForAsset:completion: method to <DFImageManager> protocol that fetches the image representation of an asset with a maximum size available.
* DFImageManager class now only directly implements <DFImageManagerCore> protocol. <DFImageManager> protocol is adopted in a category.
* DFImageManager +defaultManager methods no longer returns a singleton object but creates a new instance each time.
* DFImageRequestID is now an abstract class; Add private _DFImageRequestID implementation used by DFImageManager.
* Add DFImageInfoURLResponseKey. DFURLImageFetcher writes NSURLResponse into response info under that key.
* DFPhotosKitImageFetcher now writes the entire info dictionary from PHImageManager to the DFImageResponse info dictionary
DFImageManager 0.0.14
=====================
DFImageManager 0.0.14 is a technical release that does a lot of groundwork required for the future versions.
* Replace <DFImageFetcher> protocol -executionContextIDForRequest: method with -isRequestEquivalent:toRequest:, which is similar to <NSURLProtocol>. The image fetching implementations should return YES if they can handle both requests by the same operation.
* Replace vague ECID (execution context ID) with taskID which is used to identify instances of _DFImageManagerTask class. Make taskID completely private (ECID wasn’t).
* Remove DFExecutionContextIDForRequest function
DFImageRequestID uses instances of NSUUID instead of NSString for taskID and handlerID, which reduces memory footprint and increases performance (especially in dictionaries, up to 20%, and dictionaries are used a lot).
* DFImageManager: remove _kPreheatHandlerID and add _DFImageRequestPreheatHandler class instead. Multiple improvements in implementation.
* DFImageRequestID: remove +requestIDWithImageManager:taskID:handlerID: method, now there is only one way to initialize DFImageRequestID
* Changes in <DFImageProcessor> protocol, which is a temporary stub for now. The implementation will change in future version.
DFImageManager 0.0.13
=====================
* Major improvements in DFImageManager preheating implementation:
* DFImageManager now guarantees that preheating requests will not be executed until there are no remaining normal (non-preheating) requests. Preheating implementation no longer relies on DFImageRequestPriority and how image fetcher implements it.
* Number of concurrent preheating requests is now limited and can be configured by the users (see new DFImageManagerConfiguration class).
* There is a certain (very small) delay when the manager runs out of non-preheating requests and start executing preheating requests, which gives a higher priority for future non-preheating requests. Users no longer need to specifically manage the order in which they start normal and preheating requests (for example, when they reload data in collection view).
* Improved DFImageManager implementation. Add _DFImageManagerTask instead of _DFRequestExecutionContext (passive container). _DFImageManagerTask now implements the entire flow of fetching, caching and processing requests for multiple handlers. DFImageManager role is to manage (resume, cancel, delegate) those tasks.
* Add DFImageManagerConfiguration class (DFImageManager builder)
* Remove DFURLCacheLookupOperation and rely on NSURLSession HTTP connections per host limit instead. _DFURLImageFetcherOperation is not longer a composite operation. For more info on caching and NSURLSession read Image Caching Guide
* DFURLSessionOperation uses NSURLSessionTask priority property on iOS 8.0
* Remove DFURLCacheLookupOperation
DFImageManager 0.0.12
=====================
* Add <DFImageAsset> protocol that represents an asset that can be handled by DFImageManager. Implement <DFImageAsset> for NSURL and other supported classes via categories (Swift way).
* Remove uniqueIDForAsset: method from <DFImageFetcher>, use <DFImageAsset> methods instead
* Remove assetID parameter from <DFImageCache> methods
* Change <DFImageFetcher> -createOperationForRequest:previousOperation: method to simple -createOperationForRequest:; image manager no longer imposes a specific flow of operations creating when there is a possible previous operation
* DFURLImageFetcher implements a private operation for running cache lookup and network requests on a separate queues. DFURLImageFetcher not longer subclasses DFCachingImageFetcher; remove DFCachingImageFetcher; remove DFImageFetchConnectionOperation.
* DFImageURLCacheLookupOperation creates data task with NSURL instead of NSURLRequest so that all the NSURLSessionConfiguration parameters are used for the request
* Add DFOperation
* Add +[NSCache df_sharedImageCache] method.
* Remove DFPHAssetLocalIdentifier and use NSURL with custom scheme instead (com.github.kean.photos-kit:)
DFImageManager 0.0.11
=====================
* Deployment target increased to iOS 7
* Use NSURLSession instead of NSURLConnection
* Use NSURLCache instead of DFCache, which dramatically reduced the amount of code that needs to be maintained. Cache lookup operations still run on the separate thread from networking operations. WARNING: This release doesn’t have HTTP cache control mechanisms, which will be available in the next versions.
* Remove vague DFImageCacheStoragePolicy which is no longer used. Caching options based on NSURLSession API will be available in the next versions.
* Add DFImageURLCacheLookupOperation which uses NSURLCache
* Remove DFImageCacheLookupOperation and DFImageCacheStoreOperation
* Rename <DFImageManagerConfiguration> to <DFImageFetcher>; it now has one specific role. Change all configuration accordingly. Remove image manager argument from <DFImageFetcher> methods, which reduces coupling.
* Rename DFImageManagerConfiguration class to DFCachingImageFetcher. It now has a more specific purpose. DFCachingImageFetcher now longer requires clients to remember operation types.
* Consistent protocol naming. Rename <DFImageProcessing> protocol to <DFImageProcessor> and <DFImageCaching> to <DFImageCache>.
* Move couple more things around.
DFImageManager 0.0.10
=====================
* Rename DFNetworkImageManagerConfigurationto DFURLImageManagerConfiguration, which now supports NSURL (instead of NSString), as well as all schemes supported by Foundation URL loading system (http:, https:, ftp: and file:). The configuration can now be used for images stored in the filesystem.
* Add support for ALAssetsLibrary via DFAssetsLibraryImageManagerConfiguration and other related classes and categories.
* Add DFCollectionViewPreheatingController. Detects changes in collection view content offset and updates preheat window. The preheat window is a rect inside the collection view content which is bigger than the viewport of the collection view. Provides delegate with index paths for added and removed cells when the preheat window changes significantly.
* Add default DFImageManager (+defaultManager) that is automatically set as a shared image manager. Default manager is a composite image manager.
* Remove imageManager:shouldCancelOperation method from <DFImageManagerConfiguration> protocol. Cancellation flow is now straightforward: operations now always get cancelled as soon as there are no remaining handlers.
* DFURLConnectionOperation supports connection cancellation.
* Change <DFImageProcessingManager> protocol to <DFImageProcessing>, remove all cache related methods. Add <DFImageCaching> protocol for in-memory cache of processed images.
* DFImageManager refactoring. Add new term 'execution context' as well as 'execution context ID' (ECID) which is now used instead of vague 'operation ID'.
* DFImageManager is now able to add new handlers to the existing execution context when the image is processing by the object conforming to <DFImageProcessing> protocol.
* Remove DFImageInfoResultIsFromMemoryCacheKey. As an alternative DFImageView uses CACurrentMediaTime() to determine if the response was fast enough (memory cache for example) to disable animation. Other clients should apply similar techniques.
* Add +(NSUInteger)df_recommendedTotalCostLimit method to NSCache that uses NSProcessInfo.
* Remove DFImageInfoDataKey.
* Multiple other improvements and bug fixes.
DFImageManager 0.0.9
====================
* DFImageManager returns DFImageRequestID future so now there is effectively no job done on the main thread
* Improve DFImageManager implementation by adding cohesive _DFRequestExecutionContext instead of separate DFImageHandlerDictionary and NSMutableDictionary with operations. Remove DFImageHandlerDictionary
* DFImageRequestID no longer implements <NSCoding>
* DFImageRequestID now requires manager to conform to <DFCoreImageManager> instead of <DFImageManager> protocol
* Requires DFCache 3.0. (was DFCache 2.0)
* DFCache no longer decompressed images in the sample app, allowing DFImageManager to do the job
* Fix an issue when DFImageProcessingManager was returning original instead of a processed image
DFImageManager 0.0.8
====================
* <DFImageManager> now consists of two separate protocols <DFCoreImageManager> and <DFConvenienceImageManager>. Add new core methods that work directly with DFImageRequest
* DFCompositeImageManager and DFProxyImageManager now require initialization with instance conforming to <DFCoreImageManager> and automatically adapt <DFConvenienceImageManager> protocol
* <DFImageManager> canHandleAsset: method changed to canHandleRequest:
Remove-requestOptionsForAsset: method from <DFImageManager> because it was not clear how to use and implement it. And it isn't used by built-in managers
* Add DFCompositeImageRequest that allows users to requests multiple images at once. For example, first request might be for a placeholder for and the second for original image
* DFImageView is built on top of DFCompositeImageRequest
* Remove DFImageDecoder, move decompression methods to DFImageUtilities
DFImageProcessingManager now always decompressed images and scales them in one step. Clients don’t need to decompress images (or maintain memory cache at all). DFImageDeserializer no longer decompresses images
* <DFImageProcessingManager> processImage... method now has a completion block and is supposed to be asynchronous
* DFImageRequest now implements <NSCopying> and all requests get copied in when id<DFImageManager> methods are called
* Add userInfo to DFImageRequest
* Add DFImageManagerMaximumSize
* Delete DFImageSource enumeration, because it didn’t fit all managers. Remove DFImageInfoSourceKey, add DFImageInfoResultIsFromMemoryCacheKey instead
* Cleaner DFImageManager implementation
* Fix an issue when completion was called with an invalid DFImageRequestID
* Install OHHTTPStubs and add couple of smoke tests
* Install DFCache 2.0.1 (was 2.0.0)
DFImageManager 0.0.7
====================
* Add canHandleAsset: method in <DFImageManager> protocol. Add corresponding method to <DFImageManagerConfiguration> protocol
* Implement DFCompositeImageManager as a dynamic dispatcher in a chain of responsibility that uses <DFImageManager> canHandleAsset: method
* DFImageRequestID now maintains a weak link to the originated image manager and has methods to cancel request or change it’s priority
* Add <DFImageManagerValueTransformer> protocol that allows users to transform assets before passing them to image managers. Add DFImageManagerBlockValueTransformer class
* Add DFProxyImageManager that allows users to transform application specific assets to assets supported by image managers before forwarding invocations to actual image managers. The implementation is based on canHandleAsset: method in <DFImageManager> protocol.
* Remove DFImageManagerFactory class and protocol
* Convert to modern Objective-C syntax
* Performance optimizations
DFImageManager 0.0.6
====================
* Change <DFImageManager> protocol methods to include targetSize and contentMode. Add DFImageRequest that combines all request parameters to pass them around
* DFImageManageConfiguration is rewritten to be an abstract class that defines the specific flow of operations creation (cache lookup ~> fetch ~> cache store)
* Add DFNetworkImageManagerConfiguration built on top of DFImageManagerConfiguration that implements network image fetching and caching in DFCache
* Add classes for managing images from Photos Kit (namely DFPHImageFetchOperation, DFPHImageManagerConfiguration, DFPHAssetLocalIdentifier)
* Add <DFImageManagerFactory> protocol for matching assets and image managers.
* Add DFImageManagerFactory class that implements <DFImageManagerFactory> protocol and provides a way to register image managers for concrete asset classes
* Add DFCompositeImageManager that implements <DFImageManager> protocol and uses object conforming to <DFImageManagerFactory> to automatically forward all <DFImageManager> methods to concrete image managers
* Add <DFImageProcessingManager> protocol for resizing images and caching the results. Add it’s implementation
* Add sample project that uses Flickr API and Photos Kit to showcaseDFImageManager classes -DFImageRequestID now implements <NSCoping> and has operationID property instead of requestID
* Add DFImageUtilities for resizing images
* Remove sharedCache from DFImageManager
DFImageManager 0.0.5
====================
* Integrate DFCache 2.0.0
DFImageManager 0.0.4
====================
* Largely improved preheating API with three new methods that work exactly as you would expect
* (void)startPreheatingImagesForAssets:(NSArray *)assets options:(DFImageRequestOptions *)options;
* (void)stopPreheatingImagesForAssets:(NSArray *)assets options:(DFImageRequestOptions *)options;
* (void)stopPreheatingImageForAllAssets;
* Remove awkward isPrefetch property from DFImageRequestOptions
* DFImageView add support for Interface Builder
DFImageManager 0.0.3
====================
* Add default DFImageManagerConfiguration that supports fetching and caching image by image URL
* Add DFImageView
* Add DFImageFetchConnectionOperation
* Add cache and image manager dependency injectors
* <DFImageManagerConfiguration> imageManager:createRequestOptionsForAsset: method is now optional
* Add sample project
DFImageManager 0.0.2
====================
* DFImageManager no longer relies on NSOperation dependencies
* Simplified <DFImageManagerConfiguration> protocol
* Add DFImageCacheLookupOperation and DFImageCacheStoreOperation
* Add DFCache (separate pod) dependency
DFImageManager 0.0.1
====================
* Initial public pre-release.