Skip to content

Instantly share code, notes, and snippets.

@Marcocanc
Created March 6, 2018 13:05
Show Gist options
  • Save Marcocanc/4ebb5a70f86e45f32a3e5ac04961bfc9 to your computer and use it in GitHub Desktop.
Save Marcocanc/4ebb5a70f86e45f32a3e5ac04961bfc9 to your computer and use it in GitHub Desktop.
Kingfisher Reactive Extension
import ReactiveSwift
import ReactiveCocoa
import Kingfisher
extension Kingfisher: ReactiveExtensionsProvider { }
extension Reactive where Base == Kingfisher<UIImageView> {
var image: BindingTarget<URL?> {
return makeBindingTarget {
$0.setImage(with: $1)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment