Sha256: c52d8faeee06cba9dda94bf1ae998a2949ece719410110f4f2e26247f82a64d8

Contents?: true

Size: 452 Bytes

Versions: 32

Compression:

Stored size: 452 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.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

32 entries across 32 versions & 1 rubygems

Version Path
motion-prime-0.9.5 motion-prime/sections/table/refresh_mixin.rb
motion-prime-0.9.4 motion-prime/sections/table/refresh_mixin.rb
motion-prime-0.9.3 motion-prime/sections/table/refresh_mixin.rb
motion-prime-0.9.2 motion-prime/sections/table/refresh_mixin.rb
motion-prime-0.9.1 motion-prime/sections/table/refresh_mixin.rb
motion-prime-0.9.0 motion-prime/sections/table/refresh_mixin.rb
motion-prime-0.8.12 motion-prime/sections/table/refresh_mixin.rb
motion-prime-0.8.11 motion-prime/sections/table/refresh_mixin.rb
motion-prime-0.8.10 motion-prime/sections/table/refresh_mixin.rb
motion-prime-0.8.9 motion-prime/sections/table/refresh_mixin.rb
motion-prime-0.8.8 motion-prime/sections/table/refresh_mixin.rb
motion-prime-0.8.7 motion-prime/sections/table/refresh_mixin.rb
motion-prime-0.8.6 motion-prime/sections/table/refresh_mixin.rb
motion-prime-0.8.5 motion-prime/sections/table/refresh_mixin.rb
motion-prime-0.8.4 motion-prime/sections/table/refresh_mixin.rb
motion-prime-0.8.3 motion-prime/sections/table/refresh_mixin.rb
motion-prime-0.8.2 motion-prime/sections/table/refresh_mixin.rb
motion-prime-0.8.1 motion-prime/sections/table/refresh_mixin.rb
motion-prime-0.8.0 motion-prime/sections/table/refresh_mixin.rb
motion-prime-0.7.2 motion-prime/sections/table/refresh_mixin.rb