Sha256: b035bccfef24f332788b4e2b70f7d230c624b5cecc8e540a2a13ead2010ea79b

Contents?: true

Size: 462 Bytes

Versions: 3

Compression:

Stored size: 462 Bytes

Contents

module MotionPrime
  module TableSectionRefreshMixin
    def add_pull_to_refresh(options = {}, &block)
      screen.automaticallyAdjustsScrollViewInsets = false

      table_view.addPullToRefreshWithActionHandler(block) # block must be a variable
      screen.set_options_for table_view.pullToRefreshView, styles: [:base_pull_to_refresh]
    end

    def finish_pull_to_refresh
      reload_data
      table_view.pullToRefreshView.stopAnimating
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
motion-prime-0.9.9 motion-prime/sections/table/refresh_mixin.rb
motion-prime-0.9.8 motion-prime/sections/table/refresh_mixin.rb
motion-prime-0.9.7 motion-prime/sections/table/refresh_mixin.rb