AsyncLoadLocalImage ios 加载本地高清大图

来源:互联网 发布:python和lua 编辑:程序博客网 时间:2024/04/30 09:42

如果你的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.

git地址:https://github.com/pzhtpf/AsyncLoadLocalImage

这里写图片描述

两种用法(two usages)

  1. UIImageView(category)
#import <AsyncLoadLocalImage/TPF_ImageViewLoadLocalImage.h>[cell.imageView loadLocalImageWithUrl:path callback:^(UIImage *image, NSString *url, BOOL finished){            // do something    }]; 
  1. 异步加载图片(Asynchronous loading images)
#import <AsyncLoadLocalImage/TPF_loadLocalImage.h>[[TPF_LoadLocalImage sharedImageCache] loadLocalImageWithUrl:path callback:^(UIImage *image, NSString *url, BOOL finished){               // do something    }];
1 0