Latest0.1.1
Homepagehttps://github.com/RxSwiftCommunity/RxKingfisher
LicenseMIT
Platformsios 8.0, osx 10.10, tvos 9.0
DependenciesKingfisher, RxSwift
FrameworksFoundation
Authors

RxKingfisher

RxKingfisher
RxKingfisher
RxKingfisher
RxKingfisher
RxKingfisher

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

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

“`swift
optionSelected // Observable
.bind(to: image.kf.rx.image(options: [.transition(.fade(0.2))])
.disposed(by: disposeBag)
“`

OR

“`swift
optionSelected
.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)
“`

### Retrieve an Image without an Image View

Every `KingfisherManager` supports fetching an image from a URL, returning a `Single`:

“`swift
tappedButton
.flatMapLatest { KingfisherManager.shared.rx.retrieveImage(with: urlToImage) }
.subscribe(onNext: { image in
print(“Image successfully loaded: (image)”)
})
.disposed(by: disposeBag)
“`

### License

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

Latest podspec

{
    "name": "RxKingfisher",
    "version": "0.1.1",
    "summary": "Reactive extension for the Kingfisher image downloading and caching library",
    "description": "Reactive extension for the Kingfisher image downloading and caching library",
    "homepage": "https://github.com/RxSwiftCommunity/RxKingfisher",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Shai Mishali": "[email protected]"
    },
    "social_media_url": "https://raw.githubusercontent.com/RxSwiftCommunity/RxKingfisher/master/Images/logo.png",
    "platforms": {
        "ios": "8.0",
        "osx": "10.10",
        "tvos": "9.0"
    },
    "source": {
        "git": "https://github.com/RxSwiftCommunity/RxKingfisher.git",
        "tag": "0.1.1"
    },
    "source_files": "Sources/**/*",
    "frameworks": "Foundation",
    "swift_version": "4.0",
    "dependencies": {
        "Kingfisher": [
            "~> 4"
        ],
        "RxSwift": [
            "~> 4"
        ]
    }
}

Pin It on Pinterest

Share This