Nav apraksta

onevcat dc9a8887df Use >> instead of |> for concat processor 9 gadi atpakaļ
Demo 22e0cca9b7 Merge branch 'master' into swift3 9 gadi atpakaļ
Kingfisher.xcodeproj f8aa4ee572 Some minor refine 9 gadi atpakaļ
Kingfisher.xcworkspace bd40fca692 Rename project name 10 gadi atpakaļ
Pods c0b11bb572 Update to pod 1.0.1 9 gadi atpakaļ
Sources dc9a8887df Use >> instead of |> for concat processor 9 gadi atpakaļ
Tests dc9a8887df Use >> instead of |> for concat processor 9 gadi atpakaļ
fastlane e5d9f1df0f Remove swiftlint in CI too 9 gadi atpakaļ
images 1bd0d17179 Change logo color 10 gadi atpakaļ
.gitignore 52e63ac8ad Ignore local gem 9 gadi atpakaļ
.travis.yml 9fd2f37e62 Revert xcpretty and longer sleep 9 gadi atpakaļ
CHANGELOG.md b1fa34eec6 Bump version to 2.5.1 9 gadi atpakaļ
Kingfisher.podspec b1fa34eec6 Bump version to 2.5.1 9 gadi atpakaļ
LICENSE 6491b7996a Initial commit 11 gadi atpakaļ
Package.swift 3c5127eda2 SPM support 10 gadi atpakaļ
Podfile 433c0fcb23 Update target name from OSX to macOS 9 gadi atpakaļ
Podfile.lock c0b11bb572 Update to pod 1.0.1 9 gadi atpakaļ
README.md ca2b3874ab Fix link 9 gadi atpakaļ
codecov.yml b698e8d622 Add codecov.yml 9 gadi atpakaļ

README.md

Kingfisher

codebeat

Kingfisher is a lightweight and pure Swift implemented library for downloading and caching image from the web. This project is heavily inspired by the popular SDWebImage. And it provides you a chance to use pure Swift alternative in your next app.

Features

  • Asynchronous image downloading and caching.
  • URLSession based networking. Basic image processors and filters supplied.
  • Multiple-layer cache for both memory and disk.
  • Cancelable downloading and processing task to improve performance.
  • Independent components. Use the downloader or caching system separately as you need.
  • Prefetching images and show them from cache later when necessary.
  • Extension over UIImageView, NSImage and UIButton for setting image from a URL directly.
  • Built-in transition animation when setting images.
  • Extendable image processing and more image format support.

The simplest using case is setting an image to an image view with extension:

let url = URL(string: "url_of_your_image")
imageView.kf_setImage(with: url)

It will download the image from url, send it to both memory and disk cache, then show it in the imageView. When you use the same code later, the image will be retrieved from cache and show immediately.

Requirements

  • iOS 8.0+ / macOS 10.10+ / tvOS 9.0+ / watchOS 2.0+
  • Swift 3 (Kingfisher 3.x), Swift 2.3 (Kingfisher 2.x)

The main development of Kingfisher is based on Swift 3. There will be only fatal issue fix update for Kingfisher 2.x.

If you are upgrading to Kingfisher 3.x from an earlier version, please read the Kingfisher 3.0 Migration Guide for more information.

Next Step

Check wiki page of Kingfisher.

  • Follow the Installation Guide to integrate Kingfisher to your project.
  • Curious about what Kingfisher could do and how would it look like when used in your project? See our Cheat Sheet page, in which some useful code snippet are listed. There you can learn how to use Kingfisher in your project better.
  • At last, please also remember to check the full API Reference whenever you need to know more about Kingfisher.

Other

Future of Kingfisher

I want to keep Kingfisher slim. This framework will focus on providing a simple solution for image downloading and caching. But that does not mean the framework will not be improved. Kingfisher is far away from perfect, and necessary and useful features will be added later to make it better.

About the logo

The logo of Kingfisher is inspired by Tangram (七巧板), a dissection puzzle consisting of seven flat shapes from China. I believe she's a kingfisher bird instead of a swift, but someone insists that she is a pigeon. I guess I should give her a name. Hi, guys, do you have any suggestion?

Contact

Follow and contact me on Twitter or Sina Weibo. If you find an issue, just open a ticket on it. Pull requests are warmly welcome as well.

License

Kingfisher is released under the MIT license. See LICENSE for details.