Created
February 27, 2019 09:17
-
-
Save matdziu/d36221320817f9c6db936ab8464c34cf 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
| import UIKit | |
| class CollectionGameCell: UITableViewCell { | |
| @IBOutlet weak var gameNameLabel: UILabel! | |
| @IBOutlet weak var yearPublishedLabel: UILabel! | |
| @IBOutlet weak var gameImageView: UIImageView! | |
| override func prepareForReuse() { | |
| super.prepareForReuse() | |
| gameImageView.cancel() | |
| gameImageView.image = UIImage(named: Image.boardGamePlaceholder.rawValue) | |
| } | |
| func bind(game: CollectionGame) { | |
| gameNameLabel.text = game.name | |
| yearPublishedLabel.text = game.yearPublished | |
| gameImageView.downloaded(from: game.imageUrl, placeHolder: UIImage(named: Image.boardGamePlaceholder.rawValue)) | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment