clearsightstudio/ProMotion

View on GitHub
app/test_views/custom_collection_view_cell.rb

Summary

Maintainability
A
0 mins
Test Coverage
class CustomCollectionViewCell < PM::CollectionViewCell

  def setup(data_cell, screen)
    super.tap do
      @label.text          = data_cell[:title]
      self.backgroundColor = data_cell[:background_color]
    end
  end

  def on_created
    @label               = UILabel.new
    @label.frame         = [[0, 0], [40, 40]]
    @label.textAlignment = NSTextAlignmentCenter
    self.contentView.addSubview(@label)
  end

  def on_reused
  end

end