##简介(Introduction)
如果你的iOS项目中需要加载项目中或者沙盒中的多张高清大图时,希望这个框架能助你一臂之力。
If your iOS project needs to be loaded multi high quality images in the project or sandbox, hope this framework can help you.
类似于SDWebImage ,异步加载。两种缓存机制:内存和硬盘。
Similar to the SDWebImage, asynchronous loading. Two types of caching mechanism: memory and hard disk.
##
两种用法(two usages)
- UIImageView(category)
#import <AsyncLoadLocalImage/TPF_ImageViewLoadLocalImage.h>
[cell.imageView loadLocalImageWithUrl:path callback:^(UIImage *image, NSString *url, BOOL finished){
// do something }];
[cell.imageView loadLocalImageWithUrlToThumbnail:path maxPixelSize:600 callback:^(UIImage *image, NSString *url, BOOL finished) {
}]; //生成缩略图
- 异步加载图片(Asynchronous loading images)
#import <AsyncLoadLocalImage/TPF_loadLocalImage.h>
[[TPF_LoadLocalImage sharedImageCache] loadLocalImageWithUrl:path callback:^(UIImage *image, NSString *url, BOOL finished){
// do something
}];
[[TPF_LoadLocalImage sharedImageCache] loadLocalImageWithUrlToThumbnail:path maxPixelSize:600 callback:^(UIImage *image, NSString *url, BOOL finished) {
}]; //生成缩略图
To run the example project, clone the repo, and run pod install
from the Example directory first.
AsyncLoadLocalImage is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "AsyncLoadLocalImage"
pzhtpf, [email protected]
AsyncLoadLocalImage is available under the MIT license. See the LICENSE file for more info.