Class: Motion::AssetsLibrary::AssetCell

Inherits:
UICollectionViewCell
  • Object
show all
Defined in:
lib/project/assets_library/views/asset_cell.rb

Constant Summary collapse

IDENTIFIER =
'AssetCellIdentifier'

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#image_viewObject

Returns the value of attribute image_view.



6
7
8
# File 'lib/project/assets_library/views/asset_cell.rb', line 6

def image_view
  @image_view
end

Instance Method Details

#initWithFrame(frame) ⇒ Object



8
9
10
11
12
# File 'lib/project/assets_library/views/asset_cell.rb', line 8

def initWithFrame(frame)
  super.tap do |cell|
    cell.add_image_view
  end
end

#reset_with_asset(asset) ⇒ Object



14
15
16
# File 'lib/project/assets_library/views/asset_cell.rb', line 14

def reset_with_asset(asset)
  image_view.image = UIImage.imageWithCGImage(asset.thumbnail)
end