Skip to content

Commit

Permalink
Refactors Data Cell and Data CellViewModel to incorporate DataCellTyp…
Browse files Browse the repository at this point in the history
…eValue
  • Loading branch information
pavankataria committed Mar 13, 2017
1 parent b454c08 commit 724a6f0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
7 changes: 1 addition & 6 deletions SwiftDataTables/Classes/DataCell/DataCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
//
// }
}
5 changes: 3 additions & 2 deletions SwiftDataTables/Classes/DataCell/DataCellViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 724a6f0

Please sign in to comment.