Skip to content

Instantly share code, notes, and snippets.

@isaac-weisberg
Created April 13, 2021 21:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save isaac-weisberg/b66d1f961e7d0b291cd4e028c8086908 to your computer and use it in GitHub Desktop.
Save isaac-weisberg/b66d1f961e7d0b291cd4e028c8086908 to your computer and use it in GitHub Desktop.
class TransactionTable: CustomTableView {
override init(viewModel: TransactionTableViewModel) {
super.init()
viewModel.transactionViewModels.forEach { transactionViewModel in
switch transactionViewModel {
case .info(let viewModel):
let cell = TransactionInfoCell(viewModel: viewModel)
self.addCell(cell)
case .infoPendingAccept(let viewModel):
let cell = TransactionInfoWAcceptCell(viewModel: viewModel)
self.addCell(cell)
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment