class ButtonRow
Attributes
on_tap_callback[R]
Public Class Methods
new(key, options)
click to toggle source
Calls superclass method
TextInputRow::new
# File lib/project/rows/button_row.rb, line 7 def initialize(key, options) super @on_tap_callback = options.fetch(:action, lambda {}) end
Public Instance Methods
cell_type()
click to toggle source
# File lib/project/rows/button_row.rb, line 13 def cell_type ButtonCell end
listen()
click to toggle source
# File lib/project/rows/button_row.rb, line 17 def listen observe('FormCellWasTapped', 'tapped:') end
tapped(notification)
click to toggle source
# File lib/project/rows/button_row.rb, line 21 def tapped(notification) if notification.userInfo[:key] == key post('ButtonCallbackWillFire') on_tap_callback.call end end
update_cell(cell)
click to toggle source
Calls superclass method
TextInputRow#update_cell
# File lib/project/rows/button_row.rb, line 29 def update_cell(cell) super end