Skip to content

Instantly share code, notes, and snippets.

@isaac-weisberg
Last active April 17, 2021 10:31
Show Gist options
  • Select an option

  • Save isaac-weisberg/1bdef569df81daac5e136c721873f43f to your computer and use it in GitHub Desktop.

Select an option

Save isaac-weisberg/1bdef569df81daac5e136c721873f43f to your computer and use it in GitHub Desktop.

Revisions

  1. isaac-weisberg revised this gist Apr 17, 2021. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions SUSCellApproximateLayout.swift
    Original file line number Diff line number Diff line change
    @@ -4,9 +4,9 @@ class TransactionCellView: UIView {
    let amountLabel = UILabel()

    init(viewModel: TransactionCellViewModel) {
    // ... ommited configuration of the view style ...
    // ... omitted configuration of the view style ...

    // ... ommited AutoLayout code ...
    // ... omitted AutoLayout code ...

    iconImageView.image = UIImage(named: viewModel.icon)
    nameLabel.text = viewModel.name
  2. isaac-weisberg created this gist Apr 14, 2021.
    15 changes: 15 additions & 0 deletions SUSCellApproximateLayout.swift
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    class TransactionCellView: UIView {
    let iconImageView = UIImageView()
    let nameLabel = UILabel()
    let amountLabel = UILabel()

    init(viewModel: TransactionCellViewModel) {
    // ... ommited configuration of the view style ...

    // ... ommited AutoLayout code ...

    iconImageView.image = UIImage(named: viewModel.icon)
    nameLabel.text = viewModel.name
    amountLabel.text = viewModel.amountFormatted
    }
    }