Class: Formotion::RowType::EditRow
- Defined in:
- lib/formotion/row_type/edit_row.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from ButtonRow
Methods inherited from Base
#_on_select, #after_build, #after_delete, #break_with_semaphore, #build_cell, #button?, #cellEditingStyle, #cell_style, #delete_row, field_buffer, #indentWhileEditing?, #initialize, #on_delete, #update_cell, #with_semaphore
Constructor Details
This class inherits a constructor from Formotion::RowType::Base
Instance Method Details
#on_select(tableView, tableViewDelegate) ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/formotion/row_type/edit_row.rb', line 6 def on_select(tableView, tableViewDelegate) was_editing = tableView.isEditing if row.alt_title new_title = !was_editing ? row.alt_title : row.title tableView.cellForRowAtIndexPath(row.index_path).textLabel.text = new_title end tableView.setEditing(!was_editing, animated: true) end |