motion-prime/sections/table/table_delegate.rb in motion-prime-0.4.4 vs motion-prime/sections/table/table_delegate.rb in motion-prime-0.4.5
- old
+ new
@@ -3,9 +3,16 @@
attr_accessor :table_section
def initialize(options)
self.table_section = options[:section].try(:weak_ref)
end
+ def init_pull_to_refresh
+ return unless block = table_section.class.pull_to_refresh_block
+ table_section.add_pull_to_refresh do
+ table_section.instance_eval(&block)
+ end
+ end
+
def numberOfSectionsInTableView(table)
table_section.number_of_sections(table)
end
def tableView(table, cellForRowAtIndexPath: index)
\ No newline at end of file