Module: TableClassMethods
- Defined in:
- lib/ProMotion/table/table_class_methods.rb
Instance Method Summary collapse
- #get_indexable ⇒ Object
- #get_indexable_params ⇒ Object
- #get_longpressable ⇒ Object
- #get_longpressable_params ⇒ Object
- #get_refreshable ⇒ Object
- #get_refreshable_params ⇒ Object
- #get_row_height ⇒ Object
- #get_searchable ⇒ Object
- #get_searchable_params ⇒ Object
-
#indexable(params = {}) ⇒ Object
Indexable.
-
#longpressable(params = {}) ⇒ Object
Longpressable.
-
#refreshable(params = {}) ⇒ Object
Refreshable.
- #row_height(height, args = {}) ⇒ Object
-
#searchable(params = {}) ⇒ Object
Searchable.
- #table_style ⇒ Object
Instance Method Details
#get_indexable ⇒ Object
57 58 59 |
# File 'lib/ProMotion/table/table_class_methods.rb', line 57 def get_indexable @indexable ||= false end |
#get_indexable_params ⇒ Object
61 62 63 |
# File 'lib/ProMotion/table/table_class_methods.rb', line 61 def get_indexable_params @indexable_params ||= nil end |
#get_longpressable ⇒ Object
71 72 73 |
# File 'lib/ProMotion/table/table_class_methods.rb', line 71 def get_longpressable @longpressable ||= false end |
#get_longpressable_params ⇒ Object
75 76 77 |
# File 'lib/ProMotion/table/table_class_methods.rb', line 75 def get_longpressable_params @longpressable_params ||= nil end |
#get_refreshable ⇒ Object
43 44 45 |
# File 'lib/ProMotion/table/table_class_methods.rb', line 43 def get_refreshable @refreshable ||= false end |
#get_refreshable_params ⇒ Object
47 48 49 |
# File 'lib/ProMotion/table/table_class_methods.rb', line 47 def get_refreshable_params @refreshable_params ||= nil end |
#get_row_height ⇒ Object
19 20 21 |
# File 'lib/ProMotion/table/table_class_methods.rb', line 19 def get_row_height @row_height ||= nil end |
#get_searchable ⇒ Object
33 34 35 |
# File 'lib/ProMotion/table/table_class_methods.rb', line 33 def get_searchable @searchable ||= false end |
#get_searchable_params ⇒ Object
29 30 31 |
# File 'lib/ProMotion/table/table_class_methods.rb', line 29 def get_searchable_params @searchable_params ||= nil end |
#indexable(params = {}) ⇒ Object
Indexable
52 53 54 55 |
# File 'lib/ProMotion/table/table_class_methods.rb', line 52 def indexable(params = {}) @indexable_params = params @indexable = true end |
#longpressable(params = {}) ⇒ Object
Longpressable
66 67 68 69 |
# File 'lib/ProMotion/table/table_class_methods.rb', line 66 def longpressable(params = {}) @longpressable_params = params @longpressable = true end |
#refreshable(params = {}) ⇒ Object
Refreshable
38 39 40 41 |
# File 'lib/ProMotion/table/table_class_methods.rb', line 38 def refreshable(params = {}) @refreshable_params = params @refreshable = true end |
#row_height(height, args = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/ProMotion/table/table_class_methods.rb', line 6 def row_height(height, args={}) if height == :auto if UIDevice.currentDevice.systemVersion.to_f < 8.0 height = args[:estimated] || 44.0 mp "Using `row_height :auto` is not supported in iOS 7 apps. Setting to #{height}.", force_color: :yellow else height = UITableViewAutomaticDimension end end args[:estimated] ||= height unless height == UITableViewAutomaticDimension @row_height = { height: height, estimated: args[:estimated] || 44.0 } end |
#searchable(params = {}) ⇒ Object
Searchable
24 25 26 27 |
# File 'lib/ProMotion/table/table_class_methods.rb', line 24 def searchable(params={}) @searchable_params = params @searchable = true end |
#table_style ⇒ Object
2 3 4 |
# File 'lib/ProMotion/table/table_class_methods.rb', line 2 def table_style UITableViewStylePlain end |