ORKStepNavigationRule Class Reference

Inherits from NSObject
Conforms to NSCopying
NSSecureCoding
Declared in ORKStepNavigationRule.h

The ORKStepNavigationRule class is the abstract base class for concrete step navigation rules.

Step navigation rules can be used within an ORKNavigableOrderedTask object. You assign step navigation rules to be triggered by the task steps. Each step can have one rule at most.

Subclasses must implement the identifierForDestinationStepWithTaskResult: method, which returns the identifier of the destination step for the rule.

Two concrete subclasses are included: ORKPredicateStepNavigationRule can match any answer combination in the results of the ongoing task and jump accordingly; ORKDirectStepNavigationRule unconditionally navigates to the step specified by the destination step identifier.

– identifierForDestinationStepWithTaskResult:

Returns the target step identifier.

- (NSString *)identifierForDestinationStepWithTaskResult:(ORKTaskResult *)taskResult

Parameters

taskResult

The up-to-date task result, used for calculating the destination step.

Return Value

The identifier of the destination step.

Discussion

Subclasses must implement this method to calculate the next step based on the passed task result. The ORKNullStepIdentifier constant can be returned to indicate that the ongoing task should end after the step navigation rule is triggered.

Declared In

ORKStepNavigationRule.h