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
376 377 378 |
# File 'lib/ProMotion/table/table.rb', line 376 def get_indexable @indexable ||= false end |
#get_indexable_params ⇒ Object
380 381 382 |
# File 'lib/ProMotion/table/table.rb', line 380 def get_indexable_params @indexable_params ||= nil end |
#get_longpressable ⇒ Object
390 391 392 |
# File 'lib/ProMotion/table/table.rb', line 390 def get_longpressable @longpressable ||= false end |
#get_longpressable_params ⇒ Object
394 395 396 |
# File 'lib/ProMotion/table/table.rb', line 394 def get_longpressable_params @longpressable_params ||= nil end |
#get_refreshable ⇒ Object
362 363 364 |
# File 'lib/ProMotion/table/table.rb', line 362 def get_refreshable @refreshable ||= false end |
#get_refreshable_params ⇒ Object
366 367 368 |
# File 'lib/ProMotion/table/table.rb', line 366 def get_refreshable_params @refreshable_params ||= nil end |
#get_row_height ⇒ Object
338 339 340 |
# File 'lib/ProMotion/table/table.rb', line 338 def get_row_height @row_height ||= nil end |
#get_searchable ⇒ Object
352 353 354 |
# File 'lib/ProMotion/table/table.rb', line 352 def get_searchable @searchable ||= false end |
#get_searchable_params ⇒ Object
348 349 350 |
# File 'lib/ProMotion/table/table.rb', line 348 def get_searchable_params @searchable_params ||= nil end |
#indexable(params = {}) ⇒ Object
Indexable
371 372 373 374 |
# File 'lib/ProMotion/table/table.rb', line 371 def indexable(params = {}) @indexable_params = params @indexable = true end |
#longpressable(params = {}) ⇒ Object
Longpressable
385 386 387 388 |
# File 'lib/ProMotion/table/table.rb', line 385 def longpressable(params = {}) @longpressable_params = params @longpressable = true end |
#refreshable(params = {}) ⇒ Object
Refreshable
357 358 359 360 |
# File 'lib/ProMotion/table/table.rb', line 357 def refreshable(params = {}) @refreshable_params = params @refreshable = true end |
#row_height(height, args = {}) ⇒ Object
325 326 327 328 329 330 331 332 333 334 335 336 |
# File 'lib/ProMotion/table/table.rb', line 325 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
343 344 345 346 |
# File 'lib/ProMotion/table/table.rb', line 343 def searchable(params={}) @searchable_params = params @searchable = true end |
#table_style ⇒ Object
321 322 323 |
# File 'lib/ProMotion/table/table.rb', line 321 def table_style UITableViewStylePlain end |