Module: ProMotion::Table::TableClassMethods
- Defined in:
- lib/ProMotion/table/table.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
406 407 408 |
# File 'lib/ProMotion/table/table.rb', line 406 def get_indexable @indexable ||= false end |
#get_indexable_params ⇒ Object
410 411 412 |
# File 'lib/ProMotion/table/table.rb', line 410 def get_indexable_params @indexable_params ||= nil end |
#get_longpressable ⇒ Object
420 421 422 |
# File 'lib/ProMotion/table/table.rb', line 420 def get_longpressable @longpressable ||= false end |
#get_longpressable_params ⇒ Object
424 425 426 |
# File 'lib/ProMotion/table/table.rb', line 424 def get_longpressable_params @longpressable_params ||= nil end |
#get_refreshable ⇒ Object
392 393 394 |
# File 'lib/ProMotion/table/table.rb', line 392 def get_refreshable @refreshable ||= false end |
#get_refreshable_params ⇒ Object
396 397 398 |
# File 'lib/ProMotion/table/table.rb', line 396 def get_refreshable_params @refreshable_params ||= nil end |
#get_row_height ⇒ Object
368 369 370 |
# File 'lib/ProMotion/table/table.rb', line 368 def get_row_height @row_height ||= nil end |
#get_searchable ⇒ Object
382 383 384 |
# File 'lib/ProMotion/table/table.rb', line 382 def get_searchable @searchable ||= false end |
#get_searchable_params ⇒ Object
378 379 380 |
# File 'lib/ProMotion/table/table.rb', line 378 def get_searchable_params @searchable_params ||= nil end |
#indexable(params = {}) ⇒ Object
Indexable
401 402 403 404 |
# File 'lib/ProMotion/table/table.rb', line 401 def indexable(params = {}) @indexable_params = params @indexable = true end |
#longpressable(params = {}) ⇒ Object
Longpressable
415 416 417 418 |
# File 'lib/ProMotion/table/table.rb', line 415 def longpressable(params = {}) @longpressable_params = params @longpressable = true end |
#refreshable(params = {}) ⇒ Object
Refreshable
387 388 389 390 |
# File 'lib/ProMotion/table/table.rb', line 387 def refreshable(params = {}) @refreshable_params = params @refreshable = true end |
#row_height(height, args = {}) ⇒ Object
355 356 357 358 359 360 361 362 363 364 365 366 |
# File 'lib/ProMotion/table/table.rb', line 355 def row_height(height, args={}) if height == :auto if UIDevice.currentDevice.systemVersion.to_f < 8.0 height = args[:estimated] || 44.0 PM.logger.warn "Using `row_height :auto` is not supported in iOS 7 apps. Setting to #{height}." 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
373 374 375 376 |
# File 'lib/ProMotion/table/table.rb', line 373 def searchable(params={}) @searchable_params = params @searchable = true end |
#table_style ⇒ Object
351 352 353 |
# File 'lib/ProMotion/table/table.rb', line 351 def table_style UITableViewStylePlain end |