Skip to content

pzhtpf/AsyncLoadLocalImage

Repository files navigation

AsyncLoadLocalImage

CI Status Version License Platform

##简介(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)

  1. 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) {

}]; //生成缩略图

    1. 异步加载图片(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) {

    }]; //生成缩略图

      Usage

      To run the example project, clone the repo, and run pod install from the Example directory first.

      Requirements

      Installation

      AsyncLoadLocalImage is available through CocoaPods. To install it, simply add the following line to your Podfile:

      pod "AsyncLoadLocalImage"

      Author

      pzhtpf, [email protected]

      License

      AsyncLoadLocalImage is available under the MIT license. See the LICENSE file for more info.

      About

      Asynchronous loading local Images

      Resources

      License

      Stars

      Watchers

      Forks

      Packages

      No packages published