Created
October 5, 2017 12:42
-
-
Save koromiko/f25e866d209c7048544c4d64fe5251fb to your computer and use it in GitHub Desktop.
This file contains 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 tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { | |
guard let cell = tableView.dequeueReusableCell(withIdentifier: "photoCellIdentifier", for: indexPath) as? PhotoListTableViewCell else { fatalError("Cell not exists in storyboard")} | |
let cellVM = viewModel.getCellViewModel( at: indexPath ) | |
cell.nameLabel.text = cellVM.titleText | |
cell.descriptionLabel.text = cellVM.descText | |
cell.mainImageView?.sd_setImage(with: URL( string: cellVM.imageUrl ), completed: nil) | |
cell.dateLabel.text = cellVM.dateText | |
return cell | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment