Sha256: c95ee4e3f8b25605090706855562c5acc9807e43e89c62fe48f2cfb4d89385ed

Contents?: true

Size: 578 Bytes

Versions: 1

Compression:

Stored size: 578 Bytes

Contents

module Dynamics
  
  class CellSubmit < Cell          
    def build_cell(cell)
      cell.swizzle(:layoutSubviews) do
        def layoutSubviews
          old_layoutSubviews

          self.textLabel.center = CGPointMake(frame.size.width / 2 - (FIELD_BUFFER / 2), textLabel.center.y)
          self.detailTextLabel.center = CGPointMake(frame.size.width / 2 - (FIELD_BUFFER / 2), detailTextLabel.center.y)
        end
      end      
    end
        
    def on_select(tableViewDelegate)
      tableViewDelegate.controller.on_submit
    end  
  end      
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dynamics-0.2.0 base/templates/cell_submit.rb