Module: ProMotion::Table::TableClassMethods

Defined in:
lib/ProMotion/table/table.rb

Instance Method Summary collapse

Instance Method Details

#get_indexableObject



376
377
378
# File 'lib/ProMotion/table/table.rb', line 376

def get_indexable
  @indexable ||= false
end

#get_indexable_paramsObject



380
381
382
# File 'lib/ProMotion/table/table.rb', line 380

def get_indexable_params
  @indexable_params ||= nil
end

#get_longpressableObject



390
391
392
# File 'lib/ProMotion/table/table.rb', line 390

def get_longpressable
  @longpressable ||= false
end

#get_longpressable_paramsObject



394
395
396
# File 'lib/ProMotion/table/table.rb', line 394

def get_longpressable_params
  @longpressable_params ||= nil
end

#get_refreshableObject



362
363
364
# File 'lib/ProMotion/table/table.rb', line 362

def get_refreshable
  @refreshable ||= false
end

#get_refreshable_paramsObject



366
367
368
# File 'lib/ProMotion/table/table.rb', line 366

def get_refreshable_params
  @refreshable_params ||= nil
end

#get_row_heightObject



338
339
340
# File 'lib/ProMotion/table/table.rb', line 338

def get_row_height
  @row_height ||= nil
end

#get_searchableObject



352
353
354
# File 'lib/ProMotion/table/table.rb', line 352

def get_searchable
  @searchable ||= false
end

#get_searchable_paramsObject



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_styleObject



321
322
323
# File 'lib/ProMotion/table/table.rb', line 321

def table_style
  UITableViewStylePlain
end