Class: UnderOs::UI::Collection::Cell

Inherits:
UICollectionViewCell
  • Object
show all
Defined in:
lib/under_os/ui/collection/cell.rb

Overview

This is a bridge to the iOS native functionality please do not use it in your code

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.classesObject



7
8
9
# File 'lib/under_os/ui/collection/cell.rb', line 7

def self.classes
  @classes ||= {}
end

Instance Method Details

#prepareForReuseObject



17
18
19
20
# File 'lib/under_os/ui/collection/cell.rb', line 17

def prepareForReuse
  super
  @uos_view.cleanup if @uos_view
end

#uos_view_for(collection) ⇒ Object



11
12
13
14
15
# File 'lib/under_os/ui/collection/cell.rb', line 11

def uos_view_for(collection)
  @uos_view ||= self.class.classes[collection].for(collection).tap do |view|
    contentView.addSubview(view._)
  end
end