Sha256: 97e0087b1200f69124eaaf203da41777935ed562c677d6e947ca65ce4633be8e

Contents?: true

Size: 427 Bytes

Versions: 5

Compression:

Stored size: 427 Bytes

Contents

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

5 entries across 5 versions & 1 rubygems

Version Path
formotion-1.3 lib/formotion/row_type/edit_row.rb
formotion-1.2 lib/formotion/row_type/edit_row.rb
formotion-1.1.5 lib/formotion/row_type/edit_row.rb
formotion-1.1.4 lib/formotion/row_type/edit_row.rb
formotion-1.1.3 lib/formotion/row_type/edit_row.rb