Module: ProMotion::TableViewCellModule
- Includes:
- Styling
- Included in:
- TableViewCell
- Defined in:
- lib/ProMotion/table/cell/table_view_cell_module.rb
Instance Attribute Summary collapse
-
#data_cell ⇒ Object
Returns the value of attribute data_cell.
-
#table_screen ⇒ Object
Returns the value of attribute table_screen.
Instance Method Summary collapse
Methods included from Styling
#add, #add_to, #camelize, #closest_parent, #content_height, #content_max, #content_width, #hex_color, #remove, #rgb_color, #rgba_color, #set_attribute, #set_attributes, #view_or_self
Instance Attribute Details
#data_cell ⇒ Object
Returns the value of attribute data_cell.
5 6 7 |
# File 'lib/ProMotion/table/cell/table_view_cell_module.rb', line 5 def data_cell @data_cell end |
#table_screen ⇒ Object
Returns the value of attribute table_screen.
5 6 7 |
# File 'lib/ProMotion/table/cell/table_view_cell_module.rb', line 5 def table_screen @table_screen end |
Instance Method Details
#layoutSubviews ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/ProMotion/table/cell/table_view_cell_module.rb', line 22 def layoutSubviews super return unless data_cell # Support changing sizes of the image view if (data_cell[:image] && data_cell[:image].is_a?(Hash) && data_cell[:image][:size]) self.imageView.bounds = CGRectMake(0, 0, data_cell[:image][:size], data_cell[:image][:size]); elsif (data_cell[:remote_image] && data_cell[:remote_image][:size]) self.imageView.bounds = CGRectMake(0, 0, data_cell[:remote_image][:size], data_cell[:remote_image][:size]); end end |
#setup(data_cell, screen) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/ProMotion/table/cell/table_view_cell_module.rb', line 7 def setup(data_cell, screen) self.table_screen = WeakRef.new(screen) self.data_cell = data_cell check_deprecated_styles set_styles set_title set_subtitle set_image set_remote_image set_accessory_view set_selection_style set_accessory_type end |