[![CI Status](http://img.shields.io/travis/Bhupendra Singh/UIImageViewNetwork.svg?style=flat)](https://travis-ci.org/Bhupendra Singh/UIImageViewNetwork)
UIImageViewNetwork is easy to use Swift UIImageView extension to download image from network asynchronously in background thread.
UIImageViewNetwork also safe to use in CollectionViews and TableViews because it ignores downloading image if new url is used for image. In reuseable collection view and table view cells it first checks wheather downloaded image url is same as recent URL or not. Ignore if downloaded image url is different than recent URL.
UIImageViewNetwork also caches downloaded image to reuse. Default cache limit is 100 images. But can be easily customizable. TODO: Further improvement in image caching and purging for memory warnings.
To run the example project, clone the repo, and run pod install
from the Example directory first.
UIImageView().errorImage = UIImage(named: "ErrorImage")
UIImageView().setImageFromUrl("https://developer.apple.com/assets/elements/icons/128x128/swift_2x.png");
UIImageViewNetwork is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "UIImageViewNetwork"
Bhupendra Singh, [email protected]
UIImageViewNetwork is available under the MIT license. See the LICENSE file for more info.