mirror of
https://github.com/zhigang1992/ProMotion.git
synced 2026-06-06 14:52:00 +08:00
Fixing TableScreen table_data issue
This commit is contained in:
BIN
lib/ProMotion/.DS_Store
vendored
BIN
lib/ProMotion/.DS_Store
vendored
Binary file not shown.
@@ -1,5 +1,14 @@
|
||||
module ProMotion::MotionTable
|
||||
module SectionedTable
|
||||
def table_setup
|
||||
Console.log(" - #table_data method needed in TableScreen #{self.class.to_s}.", with_color: Console::RED_COLOR) unless self.respond_to?(:table_data)
|
||||
|
||||
self.view = self.create_table_view_from_data(self.table_data)
|
||||
if self.class.get_searchable
|
||||
self.make_searchable(content_controller: self, search_bar: self.class.get_searchable_params)
|
||||
end
|
||||
end
|
||||
|
||||
# @param [Array] Array of table data
|
||||
# @returns [UITableView] delegated to self
|
||||
def create_table_view_from_data(data)
|
||||
|
||||
@@ -17,8 +17,9 @@ module ProMotion
|
||||
args.each do |k, v|
|
||||
self.send("#{k}=", v) if self.respond_to?("#{k}=")
|
||||
end
|
||||
|
||||
|
||||
self.add_nav_bar if args[:nav_bar]
|
||||
self.table_setup if self.respond_to?(:table_setup)
|
||||
self.on_init if self.respond_to?(:on_init)
|
||||
self
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user