Sha256: 55a6bd54f464f24e049a1a31b593bbcda9b5eaef72436a6823c4f549132aea30

Contents?: true

Size: 792 Bytes

Versions: 18

Compression:

Stored size: 792 Bytes

Contents

class MPCellWithSection < UITableViewCell
  attr_reader :section
  attr_accessor :scroll_view, :content_view

  def setNeedsDisplay
    content_view.try(:setNeedsDisplay)
    super
  end

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

  def initialize_content
    self.scroll_view = self.subviews.first
    self.scroll_view.subviews.first.removeFromSuperview
    self.content_view = MPTableViewCellContentView.alloc.initWithFrame(self.bounds)
    self.content_view.setBackgroundColor(:clear.uicolor)
    self.content_view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight
    self.content_view.top = 0
    self.content_view.left = 0

    self.scroll_view.addSubview(content_view)
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
motion-prime-0.9.9 motion-prime/support/mp_cell_with_section.rb
motion-prime-0.9.8 motion-prime/support/mp_cell_with_section.rb
motion-prime-0.9.7 motion-prime/support/mp_cell_with_section.rb
motion-prime-0.9.6 motion-prime/support/mp_cell_with_section.rb
motion-prime-0.9.5 motion-prime/support/mp_cell_with_section.rb
motion-prime-0.9.4 motion-prime/support/mp_cell_with_section.rb
motion-prime-0.9.3 motion-prime/support/mp_cell_with_section.rb
motion-prime-0.9.2 motion-prime/support/mp_cell_with_section.rb
motion-prime-0.9.1 motion-prime/support/mp_cell_with_section.rb
motion-prime-0.9.0 motion-prime/support/mp_cell_with_section.rb
motion-prime-0.8.12 motion-prime/support/mp_cell_with_section.rb
motion-prime-0.8.11 motion-prime/support/mp_cell_with_section.rb
motion-prime-0.8.10 motion-prime/support/mp_cell_with_section.rb
motion-prime-0.8.9 motion-prime/support/mp_cell_with_section.rb
motion-prime-0.8.8 motion-prime/support/mp_cell_with_section.rb
motion-prime-0.8.7 motion-prime/support/mp_cell_with_section.rb
motion-prime-0.8.6 motion-prime/support/mp_cell_with_section.rb
motion-prime-0.8.5 motion-prime/support/mp_cell_with_section.rb