Sha256: 0ca0d18445f639f0e064191cdaa731e3e3dee598e4dfbb9e1b00ca6e9dda1515

Contents?: true

Size: 424 Bytes

Versions: 4

Compression:

Stored size: 424 Bytes

Contents

module Formotion
  module RowType
    class EditRow < Button
      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
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
formotion-1.1.2 lib/formotion/row_type/edit_row.rb
formotion-1.1.1 lib/formotion/row_type/edit_row.rb
formotion-1.1 lib/formotion/row_type/edit_row.rb
formotion-1.0 lib/formotion/row_type/edit_row.rb