TSTableViewModel Class Reference
Inherits from | NSObject |
Conforms to | TSTableViewDataSource |
Declared in | TSTableViewModel.h |
Overview
TSTableViewModel is a prototype for TSTableViewDataSource. There are two default ready-to-use appearance styles kTSTableViewStyleDark and kTSTableViewStyleLight provided by TSTableViewModel.
Tasks
-
columns
property -
rows
property -
tableView
property -
tableStyle
property -
heightForRow
property -
widthForExpandItem
property -
– initWithTableView:andStyle:
-
– setColumns:andRows:
-
– setRows:
-
– insertRow:atPath:
-
– removeRowAtPath:
-
– replcaceRowAtPath:withRow:
Properties
columns
Readonly array with information about columns hierarchy.
@property (nonatomic, strong, readonly) NSArray *columns
Declared In
TSTableViewModel.h
heightForRow
Row height.
@property (nonatomic, assign) CGFloat heightForRow
Discussion
Warning: This data model use fixed row height. Override TSTableViewModel to provide varied row height functionality. TSTableView support rows with varied height.
Declared In
TSTableViewModel.h
rows
Readonly array with information about rows data.
@property (nonatomic, strong, readonly) NSArray *rows
Declared In
TSTableViewModel.h
tableStyle
TSTableView style choosen during initialization
@property (nonatomic, assign, readonly) TSTableViewStyle tableStyle
Declared In
TSTableViewModel.h
tableView
Readonly reference to TSTableView instance managed by this model.
@property (nonatomic, strong, readonly) TSTableView *tableView
Declared In
TSTableViewModel.h
Instance Methods
initWithTableView:andStyle:
Initialize instance of TSTableViewModel with corresponding TSTableView object and appearance style.
- (id)initWithTableView:(TSTableView *)tableView andStyle:(TSTableViewStyle)style
Parameters
- tableView
Instance of TSTableView which would be managed by this data model.
- style
Appearance style of TSTableView.
Declared In
TSTableViewModel.h
insertRow:atPath:
Insert new row at specified path. TSTableView would be notified about changes in data model.
- (void)insertRow:(TSRow *)rowInfo atPath:(NSIndexPath *)indexPath
Declared In
TSTableViewModel.h
removeRowAtPath:
Remove row at specified path. TSTableView would be notified about changes in data model.
- (void)removeRowAtPath:(NSIndexPath *)indexPath
Parameters
- indexPath
Remove positon.
Declared In
TSTableViewModel.h
replcaceRowAtPath:withRow:
Replace (update) information in row at specified path. TSTableView would be notified about changes in data model.
- (void)replcaceRowAtPath:(NSIndexPath *)indexPath withRow:(TSRow *)rowInfo
Declared In
TSTableViewModel.h