ORKPageStepViewController Class Reference

Inherits from ORKStepViewController : UIViewController
Declared in ORKPageStepViewController.h
ORKPageStepViewController.m

Other Methods

  pageStep

The ORKPageStep associated with this view controller.

@property (nonatomic, readonly, nullable) ORKPageStep *pageStep

Declared In

ORKPageStepViewController.h

– stepViewControllerForStep:

Returns the step view controller to associate with this step. By default, this will return the step view controller instantiated by the given step.

- (ORKStepViewController *)stepViewControllerForStep:(ORKStep *)step

Return Value

ORKStepViewController subclass for this step.

Declared In

ORKPageStepViewController.h

– resultSource

Returns an ORKTaskResultSource for the steps that are included as substeps for this page view controller.

- (id<ORKTaskResultSource>)resultSource

Return Value

ORKTaskResultSource for the step results

Declared In

ORKPageStepViewController.h

– goToStep:direction:animated:

Go to the given step.

- (void)goToStep:(ORKStep *)step direction:(UIPageViewControllerNavigationDirection)direction animated:(BOOL)animated

Parameters

step

The step to go to

direction

The direction in which navigate

animated

Should the change of view controllers be animated.

Declared In

ORKPageStepViewController.h

Other Methods

– initWithStep:result:

Returns a new step view controller for the specified step.

- (instancetype)initWithStep:(ORKStep *)step result:(ORKResult *)result

Parameters

step

The step to be presented.

result

The current step result for this step.

Return Value

A newly initialized step view controller.

Declared In

ORKStepViewController.h

– result

The current state of the result. (read-only)

- (ORKStepResult *)result

Discussion

The task view controller uses this property to get the results for the step, and to collate them into the task result.

The current step result and any subsidiary results representing data collected so far are available in this property. You can detect significant changes to the result, such as when the user enters a new answer, using the stepViewControllerResultDidChange: delegate callback.

Subclasses must use this property to return the current results. Subclasses may call super to obtain a clean, empty result object appropriate for the step, to which they can attach appropriate child results.

The implementations of this method in the ResearchKit framework currently create a new result object on every call, so do not call this method unless it is actually necessary.

Declared In

ORKStepViewController.h