|
1 | | -<a href="http://www.path.com/" target="_blank"><img src="https://s3.amazonaws.com/fast-image-cache/readme-resources/path-logo.png" width="227" height="86" alt="Path Logo"></a> |
| 1 | + |
2 | 2 |
|
3 | | -# Fast Image Cache |
| 3 | +--- |
4 | 4 |
|
5 | 5 | Fast Image Cache is an efficient, persistent, and—above all—fast way to store and retrieve images in your iOS application. Part of any good iOS application's user experience is fast, smooth scrolling, and Fast Image Cache helps make this easier. |
6 | 6 |
|
@@ -143,6 +143,12 @@ The `FastImageCacheDemo` Xcode project requires Xcode 5.0 or greater and is conf |
143 | 143 |
|
144 | 144 | ### Integrating Fast Image Cache |
145 | 145 |
|
| 146 | +#### CocoaPods |
| 147 | + |
| 148 | +For easy project integration, Fast Image Cache is available as a [CocoaPod](http://cocoapods.org). |
| 149 | + |
| 150 | +#### Manually |
| 151 | + |
146 | 152 | - Clone this repository, or [download the latest archive of `master`](https://github.com/path/FastImageCache/archive/master.zip). |
147 | 153 | - From the `FastImageCache` root directory, copy the source files from the inner [`FastImageCache`](./FastImageCache) subdirectory to your Xcode project. |
148 | 154 | - Import [`FICImageCache.h`](./FastImageCache/FICImageCache.h) wherever you use the image cache. |
@@ -204,11 +210,17 @@ Here is an example implementation of the `FICEntity` protocol. |
204 | 210 |
|
205 | 211 | ```objective-c |
206 | 212 | - (NSString *)UUID { |
207 | | - return _userID; |
| 213 | + CFUUIDBytes UUIDBytes = FICUUIDBytesFromMD5HashOfString(_userID); |
| 214 | + NSString *UUID = FICStringWithUUIDBytes(UUIDBytes); |
| 215 | + |
| 216 | + return UUID; |
208 | 217 | } |
209 | 218 |
|
210 | 219 | - (NSString *)sourceImageUUID { |
211 | | - return [_userPhotoURL absoluteString]; |
| 220 | + CFUUIDBytes sourceImageUUIDBytes = FICUUIDBytesFromMD5HashOfString([_userPhotoURL absoluteString]); |
| 221 | + NSString *sourceImageUUID = FICStringWithUUIDBytes(sourceImageUUIDBytes); |
| 222 | + |
| 223 | + return sourceImageUUID; |
212 | 224 | } |
213 | 225 |
|
214 | 226 | - (NSURL *)sourceImageURLWithFormatName:(NSString *)formatName { |
@@ -377,15 +389,15 @@ The takeaway is that Fast Image Cache sacrifices disk usage to achieve a faster |
377 | 389 |
|
378 | 390 | ## Contributors |
379 | 391 |
|
380 | | -<a href="https://twitter.com/mallorypaine" target="_blank"><img src="https://s3.amazonaws.com/fast-image-cache/readme-resources/mallorypaine.jpeg" width="85" height="85" alt="Mallory Paine"></a> |
| 392 | +<a href="https://twitter.com/mallorypaine" target="_blank"><img src="http://www.gravatar.com/avatar/76db5d6bdcb64ac9e86e6a521ab57f03.jpg?s=85" alt="Mallory Paine"></a> |
381 | 393 | **Mallory Paine** — Author and Original API Design |
382 | 394 | <a href="https://twitter.com/mallorypaine" target="_blank">@mallorypaine</a> |
383 | 395 |
|
384 | 396 | Mallory is the Director of Mobile Engineering at Path, previously a member of the original iOS team at Apple. |
385 | 397 |
|
386 | 398 | --- |
387 | 399 |
|
388 | | -<a href="https://twitter.com/LucasTizma" target="_blank"><img src="https://s3.amazonaws.com/fast-image-cache/readme-resources/michaelpotter.jpeg" width="85" height="85" alt="Michael Potter"></a> |
| 400 | +<a href="https://twitter.com/LucasTizma" target="_blank"><img src="http://www.gravatar.com/avatar/2005b2ed368913850076bb52cee79713.jpg?s=85" alt="Michael Potter"></a> |
389 | 401 | **Michael Potter** — Documentation and API Refactoring |
390 | 402 | <a href="https://twitter.com/LucasTizma" target="_blank">@LucasTizma</a> |
391 | 403 |
|
|
0 commit comments