Last active
December 5, 2018 00:42
-
-
Save ArchieR7/509bda59f112840f0e0b9ace7c59ac06 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
struct CustomTableViewCellModel { | |
let title: String | |
let content: String? | |
} | |
class CustomTableViewCell: UITableViewCell { | |
@IBOutlet weak var titleLabel: UILabel! | |
@IBOutlet weak var contentTextView: UITextView! | |
var viewModel: CustomTableViewCellModel? { | |
didSet { | |
guard let viewModel = viewModel else { return } | |
titleLabel.text = viewModel.title | |
contentTextView.text = viewModel.content | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment