UIImageViewNetwork 0.1.0

UIImageViewNetwork 0.1.0

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Jul 2015
SPMSupports SPM

Maintained by Bhupendra Singh.



Summary

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.

Usage

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");

Requirements

Installation

UIImageViewNetwork is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "UIImageViewNetwork"

Author

Bhupendra Singh, [email protected]

License

UIImageViewNetwork is available under the MIT license. See the LICENSE file for more info.