| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
ILSImageCache is a lightweight, pure-Swift library for downloading and caching images from the web. It provides you a chance to use a pure-Swift alternative in your next app.
iOS 9.0+
Xcode 9.0+, Swift 4+
Download and drop the 'ILSImageCache.framework' into your Xcode project.Make Sure you add it by Embedded Binaries
let url = "url_of_your_image"
imageView.loadImageUsingCache(withUrl: url, placeholder: placeholder image, animation: UIImageView.AnimationTypes.dissolve)ILSImageCache.setCacheSize(_numberofitemscachecanhold: 10)ILSImageCache.removeImageCaches()ILSImageCache.loadImageusingCache(withUrl: imageUrl) { (status, image) in
guard let outPutimage = image
else
{
self.imageViewdwn.image = imageLiteral(resourceName: "placeholder")
return
}
self.imageViewdwn.image = outPutimage
}
public enum AnimationTypes : String
{
case hideEffect,dissolve,none
}
let url = "url_of_your_image"
button.loadImageUsingCache(withUrl: url, placeholder: placeholder image, animation: UIButton.AnimationTypes.dissolve)7.Added UIImage Extension to Resize your image on the basis of width
self.imageViewdwn.image = outPutimage.resizedImage(toWidth: self.imageViewdwn.frame.size.width)7.Added UIImage Extension to Resize your image on the basis of percentage
self.imageViewdwn.image = outPutimage.resizedImage(withPercentage: 0.2)iLeaf Solutions http://www.ileafsolutions.com
| Back | FazBrowse Home | New Git URL |