SCArrayOfStringsModel

@interface SCArrayOfStringsModel : SCArrayOfObjectsModel

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 the sectionHeaderTitleForItem modelAction is implemented, otherwise it will only generate a single SCArrayOfStringsSection.

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

    Declaration

    Objective-C

    + (instancetype)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.

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

    Declaration

    Objective-C

    - (instancetype)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.