ORKPredicateSkipStepNavigationRule Class Reference
Inherits from | ORKSkipStepNavigationRule : NSObject |
---|---|
Declared in | ORKStepNavigationRule.h ORKStepNavigationRule.m |
Other Methods
– initWithResultPredicate:
Returns an initialized predicate skip step navigation rule using the specified result predicate.
- (instancetype)initWithResultPredicate:(NSPredicate *)resultPredicate
Parameters
resultPredicate |
A result predicate. If the result predicate matches, the step will skip. |
---|
Return Value
An initialized skip predicate step navigation rule.
Declared In
ORKStepNavigationRule.h
– initWithCoder:
Returns a new predicate step navigation rule that was initialized from data in the given unarchiver.
- (instancetype)initWithCoder:(NSCoder *)aDecoder
Parameters
aDecoder |
The coder from which to initialize the step navigation rule. |
---|
Return Value
A new predicate skip step navigation rule.
Declared In
ORKStepNavigationRule.h
additionalTaskResults
An optional array of additional task results.
@property (nonatomic, copy, nullable) NSArray<ORKTaskResult*> *additionalTaskResults
Discussion
With this property, a task can have different navigation behavior depending on the results of related tasks that the user may have already completed. The predicate skip step navigation rule can use the question results within these tasks, in addition to the current task question results, to match the result predicates.
You must ensure that all the task result identifiers are unique and that they are different from the ongoing task result identifier. Also ensure that no task result contains question results with duplicate identifiers. Question results can have equal identifiers provided that they belong to different task results.
Each object in the array should be of the ORKTaskResult
class.
Declared In
ORKStepNavigationRule.h
resultPredicate
The result predicate to match.
@property (nonatomic, strong, readonly) NSPredicate *resultPredicate
Declared In
ORKStepNavigationRule.h
Other Methods
– stepShouldSkipWithTaskResult:
Returns whether the targeted step should skip.
- (BOOL)stepShouldSkipWithTaskResult:(ORKTaskResult *)taskResult
Parameters
taskResult |
The up-to-date task result, used for calculating whether the task should skip. |
---|
Return Value
YES if the step should skip.
Discussion
Subclasses must implement this method to calculate if the targeted step should skip based on the passed task result.
Declared In
ORKStepNavigationRule.h