ORKDirectStepNavigationRule Class Reference

Inherits from ORKStepNavigationRule : NSObject
Declared in ORKStepNavigationRule.h
ORKStepNavigationRule.m

Overview

The ORKDirectStepNavigationRule class can be used to unconditionally jump to a destination step specified by its identifier or to finish the task early.

Other Methods

– initWithDestinationStepIdentifier:

Returns an initialized direct-step navigation rule using the specified destination step identifier.

- (instancetype)initWithDestinationStepIdentifier:(NSString *)destinationStepIdentifier

Parameters

destinationStepIdentifier

The identifier of the destination step. Pass the ORKNullStepIdentifier constant if you want to finish the ongoing task when the direct-step navigation rule is triggered.

Return Value

A direct-step navigation rule.

Declared In

ORKStepNavigationRule.h

– initWithCoder:

Returns a new direct-step navigation rule initialized from data in a given unarchiver.

- (instancetype)initWithCoder:(NSCoder *)aDecoder

Parameters

aDecoder

The coder from which to initialize the step navigation rule.

Return Value

A new direct-step navigation rule.

Declared In

ORKStepNavigationRule.h

  destinationStepIdentifier

The identifier of the destination step.

@property (nonatomic, copy, readonly) NSString *destinationStepIdentifier

Declared In

ORKStepNavigationRule.h

Other Methods

– identifierForDestinationStepWithTaskResult:

Returns the target step identifier.

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

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