RSDActiveUIStep
public protocol RSDActiveUIStep: RSDUIStep
RSDActiveUIStep extends the RSDUIStep to include a duration and commands. This is used for the case where an
RSDUIStep has an action such as start walking
or stop walking
; the step may also implement the RSDActiveUIStep
protocol to allow for spoken instruction.
-
The duration of time to run the step. If
0, then this value is ignored.Declaration
Swift
var duration: TimeInterval -
The set of commands to apply to this active step. These indicate actions to fire at the beginning and end of the step such as playing a sound as well as whether or not to automatically start and finish the step.
Declaration
Swift
var commands: RSDActiveUIStepCommand -
Whether or not the step uses audio, such as the speech synthesizer, that should play whether or not the user has the mute switch turned on.
Declaration
Swift
var requiresBackgroundAudio: Bool -
Localized text that represents an instructional voice prompt. Instructional speech begins when the step passes the time indicated by the given time. If
timeIntervalis greater than or equal todurationor is equal toDouble.infinity, then the spoken instruction returned should be for when the step is finished.Declaration
Swift
func spokenInstruction(at timeInterval: TimeInterval) -> String?Parameters
timeIntervalThe time interval at which to speak the instruction.
Return Value
The localized instruction to speak or
nilif there isn’t an instruction.
View on GitHub
RSDActiveUIStep Protocol Reference