Sha256: 268db37245a7aa828a97ed42f59cf88b550898e178a6ed8cdfe3dfbddd266d5d

Contents?: true

Size: 633 Bytes

Versions: 2

Compression:

Stored size: 633 Bytes

Contents

module MotionPrime
  class BaseFieldSection < BaseSection
    attr_accessor :form

    def initialize(options = {})
      super
      @form = WeakRef.new(options.delete(:form))
      @container_options = options.delete(:container)
    end

    def form_name
      form.name
    end

    def container_options
      @container_options || super
    end

    def scroll_to_and_make_visible
      first_element = elements.first.last
      path = form.table.indexPathForCell first_element.view.superview
      form.table.scrollToRowAtIndexPath path,
        atScrollPosition: UITableViewScrollPositionTop, animated: true
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
motion-prime-0.1.1 motion-prime/sections/form/base_field_section.rb
motion-prime-0.1.0 motion-prime/sections/form/base_field_section.rb