Class: MPViewWithSection

Inherits:
UIView
  • Object
show all
Defined in:
motion-prime/support/mp_view_with_section.rb

Instance Attribute Summary collapse

Attributes inherited from UIView

#name

Instance Method Summary collapse

Methods inherited from UIView

#closest, #find, #height, #left, #setHeight, #setLeft, #setTop, #setWidth, #sibling, #top, #width

Instance Attribute Details

#sectionObject

Returns the value of attribute section.



2
3
4
# File 'motion-prime/support/mp_view_with_section.rb', line 2

def section
  @section
end

Instance Method Details

#drawRect(rect) ⇒ Object



8
9
10
# File 'motion-prime/support/mp_view_with_section.rb', line 8

def drawRect(rect)
  section.draw_in(rect)
end

#setSection(section) ⇒ Object



4
5
6
# File 'motion-prime/support/mp_view_with_section.rb', line 4

def setSection(section)
  @section = section.try(:weak_ref)
end