Skip to content

Commit 8b6800c

Browse files
author
Michael Shannon Potter
committed
Update README
- Use new logo URL - Add inline documentation links to FIC class, method, and property references - Add link to hosted HTML documentation - Add new video
1 parent 9370ef6 commit 8b6800c

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![Fast Image Cache Logo](http://f.cl.ly/items/162R3I2i0w2s371j0W03/logo.png)
1+
![Fast Image Cache Logo](https://s3.amazonaws.com/fast-image-cache/readme-resources/logo.png)
22

33
---
44

@@ -152,7 +152,7 @@ For easy project integration, Fast Image Cache is available as a [CocoaPod](http
152152
- Clone this repository, or [download the latest archive of `master`](https://github.com/path/FastImageCache/archive/master.zip).
153153
- From the `FastImageCache` root directory, copy the source files from the inner [`FastImageCache`](./FastImageCache) subdirectory to your Xcode project.
154154
- Import [`FICImageCache.h`](./FastImageCache/FICImageCache.h) wherever you use the image cache.
155-
- Import [`FICEntity.h`](./FastImageCache/FICEntity.h) for each class that conforms to `FICEntity`.
155+
- Import [`FICEntity.h`](./FastImageCache/FICEntity.h) for each class that conforms to [`FICEntity`](https://s3.amazonaws.com/fast-image-cache/documentation/Protocols/FICEntity.html).
156156

157157
### Initial Configuration
158158

@@ -194,7 +194,7 @@ sharedImageCache.formats = imageFormats;
194194

195195
#### Creating Entities
196196

197-
Entities are objects that conform to the `FICEntity` protocol. Entities uniquely identify entries in an image table, and they are also responsible for drawing the images they wish to store in the image cache. Applications that already have model objects defined (perhaps managed by Core Data) are usually appropriate entity candidates.
197+
Entities are objects that conform to the [`FICEntity`](https://s3.amazonaws.com/fast-image-cache/documentation/Protocols/FICEntity.html) protocol. Entities uniquely identify entries in an image table, and they are also responsible for drawing the images they wish to store in the image cache. Applications that already have model objects defined (perhaps managed by Core Data) are usually appropriate entity candidates.
198198

199199
```objective-c
200200
@interface XXUser : NSObject <FICEntity>
@@ -206,7 +206,7 @@ Entities are objects that conform to the `FICEntity` protocol. Entities uniquely
206206
@end
207207
```
208208

209-
Here is an example implementation of the `FICEntity` protocol.
209+
Here is an example implementation of the [`FICEntity`](https://s3.amazonaws.com/fast-image-cache/documentation/Protocols/FICEntity.html) protocol.
210210

211211
```objective-c
212212
- (NSString *)UUID {
@@ -248,11 +248,11 @@ Here is an example implementation of the `FICEntity` protocol.
248248
}
249249
```
250250

251-
Ideally, an entity's `UUID` should never change. This is why it corresponds nicely with a model object's server-generated ID in the case where an application is working with resources retrieved from an API.
251+
Ideally, an entity's [`UUID`](https://s3.amazonaws.com/fast-image-cache/documentation/Protocols/FICEntity.html#//api/name/UUID) should never change. This is why it corresponds nicely with a model object's server-generated ID in the case where an application is working with resources retrieved from an API.
252252

253-
An entity's `sourceImageUUID` *can* change. For example, if a user updates their profile photo, the URL to that photo should change as well. The `UUID` remains the same and identifies the same user, but the changed profile photo URL will indicate that there is a new source image.
253+
An entity's [`sourceImageUUID`](https://s3.amazonaws.com/fast-image-cache/documentation/Protocols/FICEntity.html#//api/name/sourceImageUUID) *can* change. For example, if a user updates their profile photo, the URL to that photo should change as well. The [`UUID`](https://s3.amazonaws.com/fast-image-cache/documentation/Protocols/FICEntity.html#//api/name/UUID) remains the same and identifies the same user, but the changed profile photo URL will indicate that there is a new source image.
254254

255-
> **Note**: Often, it is best to hash whatever identifiers are being used to define `UUID` and `sourceImageUUID`. Fast Image Cache provides utility functions to do this. Because hashing can be expensive, it is recommended that the hash be computed only once (or only when the identifier changes) and stored in an instance variable.
255+
> **Note**: Often, it is best to hash whatever identifiers are being used to define [`UUID`](https://s3.amazonaws.com/fast-image-cache/documentation/Protocols/FICEntity.html#//api/name/UUID) and [`sourceImageUUID`](https://s3.amazonaws.com/fast-image-cache/documentation/Protocols/FICEntity.html#//api/name/sourceImageUUID). Fast Image Cache provides utility functions to do this. Because hashing can be expensive, it is recommended that the hash be computed only once (or only when the identifier changes) and stored in an instance variable.
256256
257257
When the image cache is asked to provide an image for a particular entity and format name, the entity is responsible for providing a URL. The URL need not even point to an actual resource—e.g., the URL might be constructed of a custom URL-scheme—, but it must be a valid URL.
258258

@@ -285,12 +285,12 @@ There are a few things to note here.
285285
286286
1. Note that it is an entity and an image format name that uniquely identifies the desired image in the image cache. As a format name uniquely identifies an image table, the entity alone uniquely identifies the desired image data in an image table.
287287
1. The image cache never returns a [`UIImage`](http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&ved=0CC0QFjAA&url=http%3A%2F%2Fdeveloper.apple.com%2Flibrary%2Fios%2Fdocumentation%2Fuikit%2Freference%2FUIImage_Class%2F&ei=lG9XUtTdJIm9iwKDq4CACA&usg=AFQjCNEa2LN2puQYOfBRVPaEsvsSawOVMg&sig2=0TzbC6wzT5EdynHsDMIEUw) directly. The requested image is included in the completion block. The return value will indicate whether or not the image already exists in the image cache.
288-
1. `-retrieveImageForEntity:withFormatName:completionBlock:` is a synchronous method. If the requested image already exists in the image cache, the completion block will be called immediately. There is an asynchronous counterpart to this method called `-asynchronouslyRetrieveImageForEntity:withFormatName:completionBlock:`.
288+
1. [`-retrieveImageForEntity:withFormatName:completionBlock:`](https://s3.amazonaws.com/fast-image-cache/documentation/Classes/FICImageCache.html#//api/name/retrieveImageForEntity:withFormatName:completionBlock:) is a synchronous method. If the requested image already exists in the image cache, the completion block will be called immediately. There is an asynchronous counterpart to this method called [`-asynchronouslyRetrieveImageForEntity:withFormatName:completionBlock:`](https://s3.amazonaws.com/fast-image-cache/documentation/Classes/FICImageCache.html#//api/name/asynchronouslyRetrieveImageForEntity:withFormatName:completionBlock:).
289289
1. If a requested image does **not** already exist in the image cache, then the image cache invokes the necessary actions to request the source image for its delegate. Afterwards, perhaps some time later, the completion block will be called.
290290
291291
> **Note**: The distinction of synchronous and asynchronous only applies to the process of retrieving an image that already exists in the image cache. In the case where a synchronous image request is made for an image that does not already exist in the image case, the image cache does **not** block the calling thread until it has an image. The retrieval method will immediately return `NO`, and the completion block will be called later.
292292
>
293-
> See the `FICImageCache` class header for a thorough explanation of how the execution lifecycle works for image retrieval, especially as it relates to the handling of the completion blocks.
293+
> See the [`FICImageCache`](https://s3.amazonaws.com/fast-image-cache/documentation/Classes/FICImageCache.html) class header for a thorough explanation of how the execution lifecycle works for image retrieval, especially as it relates to the handling of the completion blocks.
294294
295295
### Providing Source Images to the Image Cache
296296
@@ -357,6 +357,8 @@ For example, if a user changes their profile photo, it probably makes sense to p
357357

358358
Fast Image Cache's header files are fully documented, and [appledoc](http://gentlebytes.com/appledoc/) can be used to generate documentation in various forms, including HTML and Xcode DocSet.
359359

360+
HTML documentation can be [found here](https://s3.amazonaws.com/fast-image-cache/documentation/index.html).
361+
360362
## Demo Application
361363

362364
Included with this repository is a demo app Xcode project. It demonstrates the difference between the conventional approach for loading and displaying images and the Fast Image Cache approach. See the [requirements for running the demo app Xcode project](#requirements).
@@ -366,12 +368,10 @@ Included with this repository is a demo app Xcode project. It demonstrates the d
366368
### Video
367369

368370
<p align="center">
369-
<a href="https://s3.amazonaws.com/fast-image-cache/readme-resources/demo-app-video.mp4" type="video/mp4"><img src="https://s3.amazonaws.com/fast-image-cache/readme-resources/demo-app-video-placeholder.png" alt="Fast Image Cache Demo App Video"></a>
371+
<a href="https://s3.amazonaws.com/fast-image-cache/readme-resources/demo-app-video.html"><img src="https://s3.amazonaws.com/fast-image-cache/readme-resources/demo-app-video-placeholder.png" alt="Fast Image Cache Demo App Video"></a>
370372
</p>
371373

372-
> **Note**: This video of the demo application was captured on an iPad mini via AirPlay. AirPlay has a maximum output framerate of 30FPS, so it is not possible to accurately capture an application scrolling at 60FPS. However, the application has an average FPS indicator to display the actual, on-device render framerate.
373-
>
374-
> Outputting to AirPlay also incurs a performance penalty, so overall demonstrated scrolling performance is lessened.
374+
> **Note**: In this demo video, the first demonstrated method is the conventional approach. The second method is using image tables.
375375
376376
### Statistics
377377

0 commit comments

Comments
 (0)