Sha256: 8058d823f129e1e1cd7bcb7010f9c25049c153c25045c03cd6e9bb35a8443b02

Contents?: true

Size: 477 Bytes

Versions: 3

Compression:

Stored size: 477 Bytes

Contents

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

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

    def finish_pull_to_refresh
      reload_data
      collection_view.pullToRefreshView.stopAnimating
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
motion-prime-1.0.0 motion-prime/sections/table/refresh_mixin.rb
motion-prime-0.9.9.2 motion-prime/sections/table/refresh_mixin.rb
motion-prime-0.9.9.1 motion-prime/sections/table/refresh_mixin.rb