Method: ProMotion::MotionTable::SectionedTable#table_setup

Defined in:
lib/ProMotion/screen_helpers/_tables/_sectioned_table.rb

#table_setupObject



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/ProMotion/screen_helpers/_tables/_sectioned_table.rb', line 5

def table_setup
  PM.logger.error "Missing #table_data method in TableScreen #{self.class.to_s}." unless self.respond_to?(:table_data)

  self.view = self.create_table_view_from_data(self.table_data)
  
  if self.class.respond_to?(:get_searchable) && self.class.get_searchable
    self.make_searchable(content_controller: self, search_bar: self.class.get_searchable_params)
  end
  if self.class.respond_to?(:get_refreshable) && self.class.get_refreshable
    if defined?(UIRefreshControl)
      self.make_refreshable(self.class.get_refreshable_params)
    else
      PM.logger.warn "To use the refresh control on < iOS 6, you need to include the CocoaPod 'CKRefreshControl'."
    end
  end
end