Class: Loco::TableViewCell

Inherits:
UITableViewCell
  • Object
show all
Includes:
Observable
Defined in:
lib/motion-loco/table_view.rb

Instance Method Summary collapse

Methods included from Observable

#init, #initWithFrame, #initialize, #method_missing, #register_observer, #remove_all_observers, #remove_observer, #set_properties

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Loco::Observable

Instance Method Details

#initWithStyle(style, reuseIdentifier: reuseIdentifier) ⇒ Object



11
12
13
14
15
16
# File 'lib/motion-loco/table_view.rb', line 11

def initWithStyle(style, reuseIdentifier:reuseIdentifier)
  if super
    view_setup # Needed because it's not Loco::Resizable
  end
  self
end

#selectObject



18
19
20
# File 'lib/motion-loco/table_view.rb', line 18

def select
  Loco.debug("Override #{self.class}#select with the action to take when the row is selected")
end

#view_controller(superview = nil) ⇒ Object Also known as: viewController



22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/motion-loco/table_view.rb', line 22

def view_controller(superview=nil)
  if superview
    view_controller = superview.nextResponder
  else
    view_controller = self.superview.nextResponder
  end
  if view_controller.is_a? UIViewController
    view_controller
  elsif view_controller.is_a? UIView
    self.view_controller(view_controller)
  end
end

#view_setupObject



36
37
38
# File 'lib/motion-loco/table_view.rb', line 36

def view_setup
  viewSetup
end

#viewSetupObject



40
41
42
# File 'lib/motion-loco/table_view.rb', line 40

def viewSetup
  Loco.debug("Override #{self.class}#viewSetup or #{self.class}#view_setup to customize the view")
end