Skip to content

Instantly share code, notes, and snippets.

@isaac-weisberg
Last active April 17, 2021 10:31
Show Gist options
  • Save isaac-weisberg/1bdef569df81daac5e136c721873f43f to your computer and use it in GitHub Desktop.
Save isaac-weisberg/1bdef569df81daac5e136c721873f43f to your computer and use it in GitHub Desktop.
class TransactionCellView: UIView {
let iconImageView = UIImageView()
let nameLabel = UILabel()
let amountLabel = UILabel()
init(viewModel: TransactionCellViewModel) {
// ... omitted configuration of the view style ...
// ... omitted AutoLayout code ...
iconImageView.image = UIImage(named: viewModel.icon)
nameLabel.text = viewModel.name
amountLabel.text = viewModel.amountFormatted
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment