Class: ProMotion::TableScreen

Inherits:
TableViewController
  • Object
show all
Defined in:
lib/pm_swipe_cells/pm_table_screen.rb

Instance Method Summary collapse

Instance Method Details

#on_cell_created(cell, data) ⇒ Object



4
5
6
7
8
# File 'lib/pm_swipe_cells/pm_table_screen.rb', line 4

def on_cell_created(cell, data)
  super
  cell.setDelegate(self)
  cell.config(right_cells: data[:properties][:right_cells], left_cells: data[:properties][:left_cells]) if cell.respond_to?(:config)
end

#swipeableTableViewCell(cell, didTriggerLeftUtilityButtonWithIndex: index) ⇒ Object



16
17
18
# File 'lib/pm_swipe_cells/pm_table_screen.rb', line 16

def swipeableTableViewCell(cell, didTriggerRightUtilityButtonWithIndex: index)
  trigger_action(cell.right_cells[index][:action], cell.right_cells[index][:arguments], cell.index_path) if (cell.right_cells and cell.right_cells[index])
end

#tableView(tableView, cellForRowAtIndexPath: indexPath) ⇒ Object



10
11
12
13
14
# File 'lib/pm_swipe_cells/pm_table_screen.rb', line 10

def tableView(tableView, cellForRowAtIndexPath: indexPath)
  cell = super
  cell.index_path = indexPath
  cell
end