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.

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

widthForExpandItem

Width of one nesting level in expand panel. Total panel width would be widthForExpandItem * maxRowNestingLevel.

@property (nonatomic, assign) CGFloat widthForExpandItem

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

Parameters

rowInfo

TSRow instance with new data.

indexPath

Insert positon.

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

Parameters

indexPath

Updated row positon.

rowInfo

TSRow instance with new data.

Declared In

TSTableViewModel.h

setColumns:andRows:

Initialize with array of columns and rows.

- (void)setColumns:(NSArray *)columns andRows:(NSArray *)rows

Parameters

columns

Array can contain objects of mixed types (TSColumn, NSDictionary, NSString). TSColumn objects would be constructed if needed.

rows

Array can contain objects of mixed types (TSRow, NSDictionary, NSString). TSRow objects would be constructed if needed.

Declared In

TSTableViewModel.h

setRows:

Initialize with rows data. Columns hierarchy remains the same.

- (void)setRows:(NSArray *)rows

Parameters

rows

Array can contain objects of mixed types (TSRow, NSDictionary, NSString). TSRow objects would be constructed if needed.

Declared In

TSTableViewModel.h