Last active
January 14, 2020 17:38
-
-
Save zafarivaev/c68da1f21b1a951ebaba77efefac5188 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 HolidayTableViewCell: UITableViewCell { | |
// MARK: - Initialization | |
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { | |
super.init(style: style, | |
reuseIdentifier: reuseIdentifier) | |
} | |
required init?(coder: NSCoder) { | |
fatalError("init(coder:) has not been implemented") | |
} | |
override func layoutSubviews() { | |
super.layoutSubviews() | |
setupUI() | |
} | |
// MARK: - Properties | |
var viewModel: HolidayViewModel! { | |
didSet { | |
self.configure() | |
} | |
} | |
lazy var holidayTitleLabel: UILabel = { | |
let label = UILabel() | |
return label | |
}() | |
} | |
// MARK: - Configuration | |
extension HolidayTableViewCell { | |
private func configure() { | |
holidayTitleLabel.text = viewModel.title | |
} | |
} | |
.... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment