Skip to content

illescasDaniel/CachedImages

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

CachedImages

An easy class to manage online images in Swift.

Main features:

  • UIImages from online images (URL)

  • Save images offline for later use (cache)

Examples

CachedImages.shared.load(image: "https://test.com/image.jpg", into: imageView)
CachedImages.shared
    .load(image: "imageurl")
    .placeholder(image: UIImage())
    .into(imageView: UIImageView())
CachedImages.shared.load(url: fullQuestion.imageURL ?? "", onSuccess: { cachedImage in
	  self.activityIndicatorView.stopAnimating()
	  self.questionImageButton.setImage(cachedImage, for: .normal)
	  self.questionImageButton.isHidden = false
  }, prepareForDownload: {
	  self.questionImageButton.isHidden = true
	  self.activityIndicatorView.startAnimating()
  }, onError: { _ in
	  self.questionImageButton.isHidden = true
	  self.activityIndicatorView.stopAnimating()
})

About

An easy class to manage online images in Swift.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages