mirror of
https://github.com/zhigang1992/ProMotion.git
synced 2026-04-29 20:55:42 +08:00
Added on_load and on_styled hooks for UIViews and on_reuse for UITableViewCells
This commit is contained in:
20
app/test_screens/test_mini_table_screen.rb
Normal file
20
app/test_screens/test_mini_table_screen.rb
Normal file
@@ -0,0 +1,20 @@
|
||||
class TestCell < PM::TableViewCell
|
||||
attr_accessor :on_reuse_fired
|
||||
|
||||
def on_reuse
|
||||
self.on_reuse_fired = true
|
||||
end
|
||||
end
|
||||
|
||||
class TestMiniTableScreen < ProMotion::TableScreen
|
||||
|
||||
attr_accessor :tap_counter, :cell_was_deleted, :got_index_path
|
||||
|
||||
def table_data
|
||||
[{
|
||||
cells: (0..20).map do |n|
|
||||
{ title: "test#{n}", cell_class: TestCell, height: 200, cell_identifier: "test" }
|
||||
end
|
||||
}]
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user