Inherits from SCArrayOfObjectsModel : SCArrayOfItemsModel : SCTableViewModel : NSObject
Declared in SCTableViewModel.h

Overview

This class functions as a table view model that is able to represent an array of string items and automatically generate its cells from these items. The class inherits all its funtionality from its superclass: SCArrayOfItemsModel, except that its items array can only contain items of type NSString. ‘SCArrayOfStringsModel will automatically generate a set of SCArrayOfStringsSection(s) if either the sectionHeaderTitleForItem modelAction or SCTableViewModelDataSource method tableViewModel:sectionHeaderTitleForItem:AtIndex: is implemented, otherwise it will only generate a single SCArrayOfStringsSection.

Tasks

Class Methods

modelWithTableView:items:

Allocates and returns an initialized ‘SCArrayOfStringsModel’ given a UITableView and an array of NSString objects.

+ (id)modelWithTableView:(UITableView *)tableView items:(NSMutableArray *)items

Parameters

tableView

The UITableView to be bound to the model.

items

An array of NSStrings that the model will use to generate its cells. This array must be of type NSMutableArray, as it must support the model’s add, delete, and move operations.

Declared In

SCTableViewModel.h

Instance Methods

initWithTableView:items:

Returns an initialized ‘SCArrayOfStringsModel’ given a UITableView and an array of NSString objects.

- (id)initWithTableView:(UITableView *)tableView items:(NSMutableArray *)items

Parameters

tableView

The UITableView to be bound to the model.

items

An array of NSStrings that the model will use to generate its cells. This array must be of type NSMutableArray, as it must support the model’s add, delete, and move operations.

Declared In

SCTableViewModel.h