Last active
January 14, 2020 17:55
-
-
Save zafarivaev/69b139465ce131e81a1cb1f1d6852e27 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 CountryTableViewCell: UITableViewCell { | |
// MARK: - Initialization | |
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { | |
super.init(style: style, reuseIdentifier: reuseIdentifier) | |
setupUI() | |
} | |
required init?(coder: NSCoder) { | |
fatalError("init(coder:) has not been implemented") | |
} | |
// MARK: - Properties | |
var viewModel: CountryViewModel! { | |
didSet { | |
self.configure() | |
} | |
} | |
..... | |
} | |
// MARK: - Configuration | |
extension CountryTableViewCell { | |
func configure() { | |
countryNameLabel.text = viewModel.name | |
} | |
} | |
..... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment