AGImagesDownloader
Requirements
Installation
AGImagesDownloader is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'AGImagesDownloader'
Description
This pod is an extension of the UIImageView class. The main functionality is to have the possibility of download images from URL easier. AGImagesDownloader has an internal cache to store all the downloaded images. At the first time to download an image the UIImageView shows an activity monitor since the start to the finish of http download.
/// Download an image from URL or load from internal cache
///
/// - Parameter url: URL of the image to download.
public func loadImageFromCache(url:URL)
/// Download an image from URL or load from internal cache
///
/// - Parameters:
/// - filename: The filename of the image to store in internal cache.
/// - url: URL of the image to download.
public func loadImageFromCache(filename:String, url:URL)
Usage
An example of use:
import AGImagesDownloader
@IBOutlet weak var imageView: UIImageView!
func ... {
imageView.loadImageFromCache(url: imageURL)
}
Screenshots
The UIImageView will show an activity monitor at the center.
Author
Antonio González, [email protected]
License
AGImagesDownloader is available under the MIT license. See the LICENSE file for more info.