Swift extension for UIImageView. Help loading image asynchronously and store local file cache.
- Load image asynchronously.
- Cache local file-based.
-
Import DPImageCache.swift
-
Simple code like this:
let imgAddress = "http://blabla.com/blabla.png"
imgView.setImageCacheWithAddress(
imgAddress,
placeHolderImage: UIImage(named: "placeHolderImage")!)
- Clean cache files:
DPImageCache.cleanCace()
www: https://dphans.me email: [email protected]