diff --git a/SwiftDataTables/Classes/DataCell/DataCell.swift b/SwiftDataTables/Classes/DataCell/DataCell.swift index 323fcb3..4bf4ff1 100644 --- a/SwiftDataTables/Classes/DataCell/DataCell.swift +++ b/SwiftDataTables/Classes/DataCell/DataCell.swift @@ -15,11 +15,6 @@ class DataCell: UICollectionViewCell { //MARK: - Lifecycle func setup(_ viewModel: DataCellViewModel){ - self.dataLabel.text = viewModel.data - -// self.highlight(viewModel.highlighted) + self.dataLabel.text = viewModel.data.stringRepresentation } -// var representedElementKind = { -// -// } } diff --git a/SwiftDataTables/Classes/DataCell/DataCellViewModel.swift b/SwiftDataTables/Classes/DataCell/DataCellViewModel.swift index c76c0fd..6d6dbb5 100644 --- a/SwiftDataTables/Classes/DataCell/DataCellViewModel.swift +++ b/SwiftDataTables/Classes/DataCell/DataCellViewModel.swift @@ -14,10 +14,11 @@ open class DataCellViewModel: VirtualPositionTrackable, CollectionViewCellRepres var xPositionRunningTotal: CGFloat? = nil var yPositionRunningTotal: CGFloat? = nil var virtualHeight: CGFloat = 0 - let data: String + let data: DataTableValueType + var highlighted: Bool = false //MARK: - Lifecycle - init(data: String){ + init(data: DataTableValueType){ self.data = data } static func registerCell(collectionView: UICollectionView) {