Skip to content

Instantly share code, notes, and snippets.

@sauravexodus
Created August 27, 2017 15:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sauravexodus/0e2906023a7eb967e0892ae103af0cab to your computer and use it in GitHub Desktop.
Save sauravexodus/0e2906023a7eb967e0892ae103af0cab to your computer and use it in GitHub Desktop.
How to use RxNuke+Firebase
import RxSwift
import RxCocoa
import RxNuke
import Nuke
// UIImageView object
lazy var myImageView: UIImageView = {
let myImageView = UIImageView()
myImageView.contentMode = .scaleAspectFit
myImageView.translatesAutoresizingMasksIntoConstraints = false
return myImageView
}()
let disposeBag = DisposeBag()
//Create a driver with your original image path reference
let imageDownloadDriver: Driver<Image> = Nuke.Manager.shared.loadImage(with: "/myReference/path")
//Drive the ui with the imageDownloadDriver
imageDownloadDriver.drive(myImageView.rx.image).disposed(by: disposeBag)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment