AFImageDownloader 1.1.0

AFImageDownloader 1.1.0

测试已测试
Lang语言 Obj-CObjective C
许可 MIT
发布最新版本2015年9月

Ash Furrow维护。



  • Ash Furrow

A simple image downloader for iOS. Still working on completing it. It's a personal side project and challenge I'm working on: can I develop a small library that will fetch and decompress JPEGs efficiently completely using Behaviour-Driven Development with Kiwi? I didn't let the app touch the Internet until it was completely done. The first time I ran it, it worked.

异步下载JPEG图像并在后台线程中解压缩它们。

用法

将以下四个文件导入到您的项目中。将AFImageDownloader.h导入到项目中,您就可以开始使用了!

  • AFImageDownloader.h
  • AFImageDownloader.m
  • NSData+AFDecompression.h
  • NSData+AFDecompression.m

用法非常简单

[AFImageDownloader imageDownloaderWithURLString:@"http://static.ashfurrow.com.s3.amazonaws.com/github/worked.jpg" autoStart:YES completion:^(UIImage *decompressedImage) {
    self.imageView.image = decompressedImage;
}];

它是一个“放火并忘记”的类,所以您不需要担心保留对它的强引用。它在完成或取消时将自动释放其自身的内存。

测试

确保进行递归检出以获取Kiwi测试框架。

git checkout --recursive git://github.com/AshFurrow/AFImageDownloader.git