ORKTableStepSource Protocol Reference

Conforms to NSObject
Declared in ORKTableStep.h

The ORKTableStepSource is a protocol that can be used for presenting a list of model objects in a UITableView. Any ORKStep subclass that implements this protocol can be used with an ORKTableStepViewController to display the list of items.

– numberOfRowsInSection: required method

Returns the number of rows in the section.

- (NSInteger)numberOfRowsInSection:(NSInteger)section

Parameters

section

The section of the table

Return Value

The number of rows in the tableview section

Declared In

ORKTableStep.h

– configureCell:indexPath:tableView: required method

Method for configuring a cell.

- (void)configureCell:(UITableViewCell *)cell indexPath:(NSIndexPath *)indexPath tableView:(UITableView *)tableView

Parameters

cell

The UITableViewCell to configure.

indexPath

The indexpath for the cell.

tableView

The table view for this cell.

Declared In

ORKTableStep.h

– numberOfSections

Returns the number of sections in the tableview used to display this step. Default = 1.

- (NSInteger)numberOfSections

Return Value

The number of sections in the tableview.

Declared In

ORKTableStep.h

– reuseIdentifierForRowAtIndexPath:

Returns the reuseIdentifier for the object at this index path. Default = ORKBasicCellReuseIdentifier

- (NSString *)reuseIdentifierForRowAtIndexPath:(NSIndexPath *)indexPath

Parameters

indexPath

The indexpath of the section/row for the cell

Return Value

The model object for this section/row

Declared In

ORKTableStep.h

– registerCellsForTableView:

Optional override for registering UITableViewCell instances. The default registers a UITableViewCell for ORKBasicCellReuseIdentifier.

- (void)registerCellsForTableView:(UITableView *)tableView

Parameters

tableView

The table view to register cells

Declared In

ORKTableStep.h

– titleForHeaderInSection:tableView:

Optional override to return custom header title for section. The default returns nil.

- (nullable NSString *)titleForHeaderInSection:(NSInteger)section tableView:(UITableView *)tableView

Parameters

section

The section for this custom header title

tableView

The table view for custom section header title

Return Value

The custom header title for this section

Declared In

ORKTableStep.h

– viewForHeaderInSection:tableView:

Optional override to return custom header view for section. The default returns nil.

- (nullable UIView *)viewForHeaderInSection:(NSInteger)section tableView:(UITableView *)tableView

Parameters

section

The section for this custom header view

tableView

The table view for custom section header view

Return Value

The custom header view for this section

Declared In

ORKTableStep.h