Swiftpack.co - RxSwiftCommunity/RxKingfisher as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by RxSwiftCommunity.
RxSwiftCommunity/RxKingfisher 2.1.0
Reactive extension for the Kingfisher image downloading and caching library
⭐️ 222
🕓 2 years ago
iOS macOS watchOS tvOS
.package(url: "https://github.com/RxSwiftCommunity/RxKingfisher.git", from: "2.1.0")


RxKingfisher is a Reactive Extension for Kingfisher - a lightweight, pure-Swift library for downloading and caching images from the web.

RxKingfisher Example

It provides Reactive Extensions on top of Kingfisher's .kf namespace, via .kf.rx and introduces two main usages:

Bind URL to Image View by Resource or Source

Every Image view supports two different options for binding a URL to an Image view.

optionSelected // Observable<Resource> or Observable<Source>
    .bind(to: image.kf.rx.image(options: [.transition(.fade(0.2))])
    .disposed(by: disposeBag)


optionSelected // Observable<Resource> or Observable<Source>    
    .flatMap { url in imageView.kf.rx.setImage(with: url, options: [.transition(.fade(0.2))]) }
    .subscribe(onNext: { image in
        print("Image successfully loaded and set on Image view: \(image)")
    .disposed(by: disposeBag)


URL is implementing Resource (See Kingfisher.Resource.swift)

Retrieve an Image without an Image View

Every KingfisherManager supports fetching an image from a URL, returning a Single<Image>:

    .flatMapLatest { KingfisherManager.shared.rx.retrieveImage(with: urlToImage) }
    .subscribe(onNext: { image in
        print("Image successfully loaded: \(image)")
    .disposed(by: disposeBag)


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


Stars: 222
Last commit: 1 year ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

RxKingfisher 2.1.0
2 years ago

Fix missing public ACL for rx namespace

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics