class ProMotion::TableScreen

Public Instance Methods

on_cell_created(cell, data) click to toggle source
Calls superclass method
# File lib/pm_swipe_cells/pm_table_screen.rb, line 5
def on_cell_created(cell, data)
  super

  cell.setDelegate((data[:delegate].nil? ? self : data[:delegate])) if cell.respond_to?(:"setDelegate:")
  if data[:properties]
    data[:properties].reject{|k,v| [:right_buttons, :left_buttons].include?(k)}.each {|k,v| cell.send("#{k}=", v) if cell.respond_to?("#{k}=")}
    cell.config(right_buttons: data[:properties][:right_buttons], left_buttons: data[:properties][:left_buttons]) if cell.respond_to?(:config)
  end
end
swipeableTableViewCell(cell, didTriggerRightUtilityButtonWithIndex: index) click to toggle source
# File lib/pm_swipe_cells/pm_table_screen.rb, line 21
def swipeableTableViewCell(cell, didTriggerRightUtilityButtonWithIndex: index)
  trigger_action(cell.right_buttons[index][:action], cell.right_buttons[index][:arguments], cell.index_path) if (cell.right_buttons and cell.right_buttons[index])
end
tableView(tableView, cellForRowAtIndexPath: indexPath) click to toggle source
Calls superclass method
# File lib/pm_swipe_cells/pm_table_screen.rb, line 15
def tableView(tableView, cellForRowAtIndexPath: indexPath)
  cell = super
  cell.index_path = indexPath if cell.respond_to?(:index_path)
  cell
end