DPImageCache UIImageView 扩展

程序名称:DPImageCache

授权协议: 未知

操作系统: iOS

开发语言: Swift

DPImageCache 介绍

DPImageCache 是 Swift 写成的 UIImageView 的扩展,帮助加载图像异步存储本地文件缓存。

使用:

let dirName = "cache"
func createCacheDirectory() {
        var fileMan = NSFileManager.defaultManager()
        var cacheDir = (NSSearchPathForDirectoriesInDomains(
            .DocumentDirectory,
            .UserDomainMask, true)[0] as! NSString)
            .stringByAppendingPathComponent(dirName)
        if !fileMan.fileExistsAtPath(cacheDir) {
            fileMan.createDirectoryAtPath(
                cacheDir,
                withIntermediateDirectories: false,
                attributes: nil,
                error: nil)
        }
    }

DPImageCache 官网

https://github.com/dphans/DPImageCache

相关编程语言

Acapela TTS 是一个为 iPhone 和 iPad 开发的 TTS 引...
二维码(QR Code)扫描静态库,扫描效率较高。
RegexKitLite 是一个轻量级的 Objective-C 的正则表...
一款基于ASIHttpReques开源的仿迅雷多线程断点续传功...
实现动态检测网络(wifi)状况,不需要用户手动刷新...
使用iphoneSDK官方NSXMLParserDelegate做的简单xml解...