ORKTableStep Class Reference
| Inherits from | ORKStep : NSObject |
|---|---|
| Conforms to | ORKTableStepSource |
| Declared in | ORKTableStep.h ORKTableStep.m |
Overview
The ORKTableStep class is a concrete subclass of ORKStep, used for presenting a list of model
objects in a UITableView.
To use ORKTableStep, instantiate the object, fill in its properties, and include it
in a task. Next, create a task view controller for the task and present it.
The base class implementation will instatiate a read-only ORKTableStepViewController to display
the list of items using UITableViewCell with the text set to the -description for each item in
the items array.
Customization can be handled by overriding the base class implementations in either ORKTableStep
or ORKTableStepViewController.
Other Methods
items
The array of items in table. These items must conform to NSCopying and NSSecureCoding protocols.
@property (nonatomic, copy, nullable) NSArray<id<NSObject,NSCopying,NSSecureCoding> > *itemsDeclared In
ORKTableStep.h
isBulleted
Boolean flag representing if the table data should be displayed in a bulleted format.
@property (nonatomic) BOOL isBulletedDeclared In
ORKTableStep.h
bulletIconNames
The array of icon names to display instead of bullets.
@property (nonatomic, copy, nullable) NSArray<NSString*> *bulletIconNamesDiscussion
Images are only visible if the isBulleted property is set to YES. Images names must reference images in you application project not the ResearchKit framework.
Declared In
ORKTableStep.h
– numberOfSections
Returns the number of sections in the tableview used to display this step. Default = 1.
- (NSInteger)numberOfSectionsReturn Value
The number of sections in the tableview.
Declared In
ORKTableStep.h
– numberOfRowsInSection:
Returns the number of rows in the section. Default = items.count
- (NSInteger)numberOfRowsInSection:(NSInteger)sectionParameters
section |
The section of the table |
|---|
Return Value
The number of rows in the tableview section
Declared In
ORKTableStep.h
– objectForRowAtIndexPath:
Returns the model object for this section/row. Default = items[indexPath.row]
- (id<NSObject,NSCopying,NSSecureCoding>)objectForRowAtIndexPath:(NSIndexPath *)indexPathParameters
indexPath |
The indexpath of the section/row for the cell |
|---|
Return Value
The model object for this section/row
Declared In
ORKTableStep.h
– reuseIdentifierForRowAtIndexPath:
Returns the reuseIdentifier for the object at this index path. Default = ORKBasicCellReuseIdentifier
- (NSString *)reuseIdentifierForRowAtIndexPath:(NSIndexPath *)indexPathParameters
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 for ORKBasicCellReuseIdentifier.
- (void)registerCellsForTableView:(UITableView *)tableViewDeclared In
ORKTableStep.h
– configureCell:indexPath:tableView:
Optional override for configuring a cell. The default will set the text label using the object description for the object at a given index path.
- (void)configureCell:(UITableViewCell *)cell indexPath:(NSIndexPath *)indexPath tableView:(UITableView *)tableViewDeclared In
ORKTableStep.h