Last active
February 6, 2017 17:12
-
-
Save leontiy/8386e5d6bb3403b14c8016d3b8311642 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func awakeFromNib() { | |
super.awakeFromNib() | |
self.titleLabel.reactive.text <~ self.viewModel.map { $0?.title } | |
self.label.reactive.text <~ self.viewModel.map { $0?.text } | |
self.imageView.reactive.image <~ self.viewModel.producer.flatMap(.latest) { | |
downloadImage($0.imageUrl).map(Optional.some).prefix(value: nil) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment