Skip to content

Commit 46f87f7

Browse files
authored
Update README.md
- clean up some ambiguous parts - remove references to TIPImageView which is gone
1 parent 92424cf commit 46f87f7

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

README.md

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,15 @@ in-memory cache, the in-memory cache, and the on-disk cache. Entries in the
6363
caches are keyed by an _image identifier_ which is provided by the creator of
6464
the fetch request or automatically generated from the image fetch's URL.
6565

66-
- The _On-Disk Cache_ will maintain both the latest partial image and the largest matching image (based on the image identifier)
66+
- The _On-Disk Cache_ will maintain both the latest partial image and the largest completed image for an _image identifier_
6767
- The _In-Memory Cache_ will maintain the largest matching UIImage (based on the image identifier), but has no bias to the image being rendered/decoded or not
6868
- The _Rendered In-Memory Cache_ will maintain the 3 most recently sized and rendered/decoded UIImages that match (based on the image identifier)
6969

7070
The image will simultaneously be loaded into memory (as raw bytes) and
7171
written to the disk cache when retrieving from the Network. Partial images
7272
will be persisted as well and not replace any completed images in the cache.
7373

74-
Once the image is either hit or retrieved from any of the caches or the
74+
Once the image is either retrieved from any of the caches or the
7575
network, the retrieved image will percolate back through the caches in its
7676
various forms.
7777

@@ -92,8 +92,8 @@ When the request is made, the fetch operation will perform the following:
9292

9393
- Synchronously consult the _Rendered In-Memory Cache_ for an image that will fit the target dimensions and content mode.
9494
- On miss, asynchronously consult the _In-Memory Cache_ that maintains the UIImage of the largest matching image (based on identifier).
95-
- On miss, asynchronously consult the _On-Disk Cache_ that maintains the raw bytes of the largest matching image (based on identifier).
96-
- On miss, asynchronously consult any provided _additional caches_ (based on URL). This is so that legacy caches can be pulled from when transitioning to *TIP* without having to forcibly load all assets again. Twitter additionally uses this with its segregated pipeline design to pull an image from another account's pipeline while maintaining separation in the even of an account's removal which will clear that account's pipeline's caches.
95+
- On miss, asynchronously consult the _On-Disk Cache_ that maintains the raw bytes of the largest matching image (based on identifier). As an optimization, *TIP* will take it a step further and also consult all other registered _pipeline disk caches_ - thus saving on the cost of network load by pulling from disk. The cross pipeline retrieved image will be stored to the fetching pipeline's caches to maintain image pipeline siloing. _Note:_ this cross pipeline access requires the fetching image identifier and image URL to match.
96+
- On miss, asynchronously consult any provided _additional caches_ (based on URL). This is so that legacy caches can be pulled from when transitioning to *TIP* without having to forcibly load all assets again.
9797
- On miss, asynchronously retrieve the image from the _Network_, resuming any partially loaded data that may exist in the _On-Disk Cache_.
9898

9999
### Preview Support
@@ -102,14 +102,15 @@ In addition to this simple progression, the fetch operation will offer the first
102102
(based on image identifier) complete image in the In-Memory Cache or On-Disk Cache
103103
(rendered and resized to the request's specified target sizing) as a preview image when the URLs
104104
don't match. At that point, the fetch delegate can choose to just use the preview image or continue
105-
with the _Network_ loading the final image.
105+
with the _Network_ loading the final image. This is particularly useful when the fetch image URL is
106+
for a smaller image than the image in cache, no need to hit the network :)
106107

107108
### Progressive Support
108109

109110
A great value that the _image pipeline_ offers is the ability to stream progressive scans of an
110111
image, if it is PJPEG, as the image is loaded from the Network. This progressive rendering is
111-
natively supported by iOS 8+, but will not be supported in iOS 7 or below. Progressive support is
112-
opt-in and also configurable in how scans should load.
112+
natively supported by iOS 8+, but will not be supported in iOS 7 (the minimum OS for *TIP*).
113+
Progressive support is opt-in and also configurable in how scans should load.
113114

114115
### Resuming Image Downloads
115116

@@ -204,12 +205,16 @@ image pipeline works.
204205
- `TIPImageContainer`
205206
- object to encapsulate the relevant info for a fetched image
206207
- the `TIPImageFetchDelegate` will use `TIPImageContainer` instances for callbacks, and the `TIPImageFetchOperation` will maintain `TIPImageFetchOperation` properties as it progresses.
207-
- `TIPImageView`
208-
- convenience encapsulation for dealing with loading a image for display by subclassing `UIImageView`
208+
- `TIPImageViewFetchHelper`
209+
- powerful class that can encapsulate the majority of use cases for loading an image and displaying it in a `UIImageView`
210+
- 99% of image loading and displaying use cases can be solved by using this class, configuring it and providing a delegate and/or data source
211+
- having the logic in this class avoid coupling _controller_ code with _view_ code in the _MVC_ practice
212+
- `UIImageView(TIPImageViewFetchHelper)`
213+
- convenience category on `UIImageView` for associating a `TIPImageViewFetchHelper`
209214

210215
## Usage
211216

212-
The simplest way to use *TIP* is with the `TIPImageView` and its `TIPImageViewHelper` counterpart.
217+
The simplest way to use *TIP* is with the `TIPImageViewHelper` counterpart.
213218

214219
For concrete coding samples, look at the *TIP Sample App* and *TIP Swift Sample App* (in Objective-C and Swift, respectively).
215220

0 commit comments

Comments
 (0)