ORKTableStepViewController Class Reference

Inherits from ORKStepViewController : UIViewController
Conforms to UITableViewDataSource
UITableViewDelegate
Declared in ORKTableStepViewController.h
ORKTableStepViewController.m

Overview

The ORKTableStepViewController class is an base class that inherits from ORKStepViewController and provides a UITableView.

ORKTableStepViewController is designed to take advantage of the internal class methods used by ORKFormStepViewController, ORKQuestionStepViewController and ORKReviewStepViewController to allow for a consistent UI in a custom implementation of a main view that is a UITableView.

This will class will setup a consistent look for the title, text, learn more, skip and next UI elements that are used by these classes as well as most of the other view controllers within this framework by automatically adding them as the header and footer of the tableview.

The base class implementation REQUIRES using an ORKTableStep as its data source. If you do not inherit the step from ORKTableStep, then subclasses MUST override -cellForRowAtIndexPath.

Other Methods

  tableStep

The step associated with this view controller if it conforms to ORKTableStepSource.

@property (nonatomic, readonly, nullable) id<ORKTableStepSource> tableStep

Return Value

The step associated with this view controller if it conforms to ORKTableStepSource.

Declared In

ORKTableStepViewController.h

  tableView

The table view managed by the controller object.

@property (nonatomic, readonly) UITableView *tableView

Return Value

The table view managed by the controller object.

Declared In

ORKTableStepViewController.h

– continueButtonEnabled

Whether or not the continue button should be enabled for this step. Default = YES

- (BOOL)continueButtonEnabled

Return Value

State of continue button

Discussion

Set to NO if there is a validation that needs to be handled before the step can progress. Your implementation is responsible for overriding selection as needed to trigger validation and state changes.

Declared In

ORKTableStepViewController.h

– updateButtonStates

Update the button state for the skip and continue buttons

- (void)updateButtonStates

Declared In

ORKTableStepViewController.h

Other Methods

– setCancelButtonItem:

The cancel button item.

- (void)setCancelButtonItem:(UIBarButtonItem *)cancelButtonItem

Discussion

The cancel button item controls the Cancel button displayed in the navigation bar when the step view controller is current. This property lets you control the appearance and target of the Cancel button at runtime.

When the value of the property is nil, the Cancel button is not displayed; otherwise, the title, target, and action associated with the Cancel button item are used (other properties of UIBarButtonItem are ignored).

The cancel button item is updated during view loading and when the value of the step property is changed, but is safe to set in the taskViewController:stepViewControllerWillAppear: delegate callback.

Subclasses can safely modify this property any time after calling viewWillAppear: on super.

Declared In

ORKStepViewController.h

Extension Methods

  tableViewStyle

The style to use for the tableView. default = UITableViewStyleGrouped if more than one section and UITableViewStylePlain if there is only 1 section.

@property (nonatomic, readonly) UITableViewStyle tableViewStyle

Return Value

The style to use for the tableView. default = UITableViewStyleGrouped if more than one section and UITableViewStylePlain if there is only 1 section.

Declared In

ORKTableStepViewController_Internal.h