|
@@ -27,6 +27,7 @@ Features
|
|
- Image effect: blur, round corner, resize, color tint, crop, rotate and more.
|
|
- Image effect: blur, round corner, resize, color tint, crop, rotate and more.
|
|
- High performance memory and disk image cache.
|
|
- High performance memory and disk image cache.
|
|
- High performance image loader to avoid main thread blocked.
|
|
- High performance image loader to avoid main thread blocked.
|
|
|
|
+- Dynamic memory buffer for lower memory usage when display animated image.
|
|
- Fully documented.
|
|
- Fully documented.
|
|
|
|
|
|
Usage
|
|
Usage
|
|
@@ -79,6 +80,26 @@ Usage
|
|
NSLog(@"load from disk cache");
|
|
NSLog(@"load from disk cache");
|
|
}
|
|
}
|
|
}];
|
|
}];
|
|
|
|
+
|
|
|
|
+###Image Cache
|
|
|
|
+ YYImageCache *cache = [YYWebImageManager sharedManager].cache;
|
|
|
|
+
|
|
|
|
+ // get cache capacity
|
|
|
|
+ cache.memoryCache.totalCost;
|
|
|
|
+ cache.memoryCache.totalCount;
|
|
|
|
+ cache.diskCache.totalCost;
|
|
|
|
+ cache.diskCache.totalCount;
|
|
|
|
+
|
|
|
|
+ // clear cache
|
|
|
|
+ [cache.memoryCache removeAllObjects];
|
|
|
|
+ [cache.diskCache removeAllObjects];
|
|
|
|
+
|
|
|
|
+ // clear disk cache with progress
|
|
|
|
+ [cache.diskCache removeAllObjectsWithProgressBlock:^(int removedCount, int totalCount) {
|
|
|
|
+ // progress
|
|
|
|
+ } endBlock:^(BOOL error) {
|
|
|
|
+ // end
|
|
|
|
+ }];
|
|
|
|
|
|
Installation
|
|
Installation
|
|
==============
|
|
==============
|
|
@@ -150,12 +171,13 @@ YYWebImage 是一个异步图片加载框架 ([YYKit](https://github.com/ibireme
|
|
特性
|
|
特性
|
|
==============
|
|
==============
|
|
- 异步的图片加载,支持 HTTP 和本地文件。
|
|
- 异步的图片加载,支持 HTTP 和本地文件。
|
|
-- 支持 WebP、APNG、GIF 动画。
|
|
|
|
|
|
+- 支持 GIF、APNG、WebP 动画。
|
|
- 支持逐行扫描、隔行扫描、渐进式图像加载。
|
|
- 支持逐行扫描、隔行扫描、渐进式图像加载。
|
|
- UIImageView、UIButton、MKAnnotationView、CALayer 的 Category 方法支持。
|
|
- UIImageView、UIButton、MKAnnotationView、CALayer 的 Category 方法支持。
|
|
- 常见图片处理:模糊、圆角、大小调整、裁切、旋转、色调等。
|
|
- 常见图片处理:模糊、圆角、大小调整、裁切、旋转、色调等。
|
|
- 高性能的内存和磁盘缓存。
|
|
- 高性能的内存和磁盘缓存。
|
|
- 高性能的图片设置方式,以避免主线程阻塞。
|
|
- 高性能的图片设置方式,以避免主线程阻塞。
|
|
|
|
+- 高效的动态内存缓存管理,以保证高性能低内存的动画播放。
|
|
- 每个类和方法都有完善的文档注释。
|
|
- 每个类和方法都有完善的文档注释。
|
|
|
|
|
|
用法
|
|
用法
|
|
@@ -208,6 +230,27 @@ YYWebImage 是一个异步图片加载框架 ([YYKit](https://github.com/ibireme
|
|
NSLog(@"load from disk cache");
|
|
NSLog(@"load from disk cache");
|
|
}
|
|
}
|
|
}];
|
|
}];
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+###图片缓存
|
|
|
|
+ YYImageCache *cache = [YYWebImageManager sharedManager].cache;
|
|
|
|
+
|
|
|
|
+ // get cache capacity
|
|
|
|
+ cache.memoryCache.totalCost;
|
|
|
|
+ cache.memoryCache.totalCount;
|
|
|
|
+ cache.diskCache.totalCost;
|
|
|
|
+ cache.diskCache.totalCount;
|
|
|
|
+
|
|
|
|
+ // clear cache
|
|
|
|
+ [cache.memoryCache removeAllObjects];
|
|
|
|
+ [cache.diskCache removeAllObjects];
|
|
|
|
+
|
|
|
|
+ // clear disk cache with progress
|
|
|
|
+ [cache.diskCache removeAllObjectsWithProgressBlock:^(int removedCount, int totalCount) {
|
|
|
|
+ // progress
|
|
|
|
+ } endBlock:^(BOOL error) {
|
|
|
|
+ // end
|
|
|
|
+ }];
|
|
|
|
|
|
安装
|
|
安装
|
|
==============
|
|
==============
|