Sha256: 8988eaf8429f9b2142f4ebd656cd6d25099a5c643da928bff9437f7096139da8

Contents?: true

Size: 924 Bytes

Versions: 2

Compression:

Stored size: 924 Bytes

Contents

module Formotion
  module RowType
    class Base
      attr_accessor :row, :tableView

      def tableView
        @tableView ||= self.row.form.table
      end

      def initialize(row)
        @row = row
      end

      def submit_button?
        false
      end

      # RowCellBuilder uses this to instantiate the UITableViewCell.
      def cell_style
        UITableViewCellStyleSubtitle
      end

      # builder method for row cell specific implementation
      def build_cell(cell)
        # implement in row class
        nil
      end

      # called by the Row after all the setup and connections are made
      # in #make_cell
      def after_build(cell)
      end

      # method gets triggered when tableView(tableView, didSelectRowAtIndexPath:indexPath)
      # in UITableViewDelegate is executed
      def on_select(tableView, tableViewDelegate)
        # implement in row class
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
formotion-0.5.1 lib/formotion/row_type/base.rb
formotion-0.5 lib/formotion/row_type/base.rb