Sha256: 56d53f6a8a2f7ad0c1f4c8f02cc181f3fbb2ec5b6ff3da7c052670f4411aa4c0

Contents?: true

Size: 425 Bytes

Versions: 9

Compression:

Stored size: 425 Bytes

Contents

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

      table_view.addPullToRefreshWithActionHandler(block)
      screen.setup 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

9 entries across 9 versions & 1 rubygems

Version Path
motion-prime-0.4.4 motion-prime/sections/table/refresh_mixin.rb
motion-prime-0.4.3 motion-prime/sections/table/refresh_mixin.rb
motion-prime-0.4.2 motion-prime/sections/table/refresh_mixin.rb
motion-prime-0.4.1 motion-prime/sections/table/refresh_mixin.rb
motion-prime-0.4.0 motion-prime/sections/table/refresh_mixin.rb
motion-prime-0.3.3 motion-prime/sections/table/refresh_mixin.rb
motion-prime-0.3.2 motion-prime/sections/table/refresh_mixin.rb
motion-prime-0.3.1 motion-prime/sections/table/refresh_mixin.rb
motion-prime-0.3.0 motion-prime/sections/table/refresh_mixin.rb