Added on_load and on_styled hooks for UIViews and on_reuse for UITableViewCells

This commit is contained in:
Jamon Holmgren
2014-11-17 19:45:23 -08:00
parent 77b86eaf33
commit 131ddc761a
8 changed files with 103 additions and 10 deletions

View 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