Skip to content

A bare-bones library for downloading and caching images.

License

Notifications You must be signed in to change notification settings

joerocca/NetworkImageLoader

Repository files navigation

NetworkImageLoader

Usage

General

let task = NetworkImageLoader.shared.downloadAndCacheImage(withUrl: imageUrl) { (image, error) in
    guard let image = image else {
        print(error?.localizedDescription ?? "Error downloading image.")
        return
    }
    print(image)
}

UIImageView

imageView.setImage(withUrl: imageUrl)
imageView.cancelImageDownload()

Prefetching

NetworkImageLoader.shared.prefetchImage(withUrl: imageUrl)

About

A bare-bones library for downloading and caching images.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published