RSDSurveyNavigationStep
public protocol RSDSurveyNavigationStep : RSDNavigationRule
RSDSurveyNavigationStep evaluates RSDSurveyRule objects that are associated with each input field to determine
if the step navigation should skip to another step.
-
Identifier to skip to if all input fields have nil answers.
Declaration
Swift
var skipToIfNil: String? -
The input fields to test as a part of this navigation.
Declaration
Swift
var inputFields: [RSDInputField]
-
evaluateSurveyRules(with:isPeeking:)Extension methodEvaluate the survey rules for the given task result and return the next identifier.
This method inspects all the survey rules and will return a value under the following conditions:
- If all the results are
nilandisPeekingequalsfalse, then it will return the value ofskipToIfNilIf one and only one skip identifier is returned by the evaluated survey rules.
Note
RSDSurveyNavigationStepextendsRSDNavigationRulebut does not implement thenextStepIdentifier()method because that will allow for additional customization by the step that is implementing this protocol.Seealso
RSDFormUIStepObjectfor an example implementation.- result: The task result to evaluate.
- isPeeking: Is this navigation rule being called on a result for a step that is navigating forward or is it a step navigator that is peeking at the next step to set up UI display? If peeking at the next step then this parameter will be
true.Declaration
Swift
public func evaluateSurveyRules(with result: RSDTaskResult?, isPeeking: Bool) -> String?Parameters
resultThe task result to evaluate.
isPeekingIs this navigation rule being called on a result for a step that is navigating forward or is it a step navigator that is peeking at the next step to set up UI display? If peeking at the next step then this parameter will be
true.Return Value
The identifier for the step to skip to if the rules are
true. - If all the results are
View on GitHub
RSDSurveyNavigationStep Protocol Reference