SimpleTaskStep
open class SimpleTaskStep : OnboardingStep
This step is capable of integrating a simple functionality into the onboarding flow, without the need to implement the whole OnboardingStep protocol. Provides a convenient way of using the same piece of logic for both onboard and restore processes.
-
The type of the onboard and restore methods’ completionHandler on the OnboardingStep protocol.
Declaration
Swift
public typealias FlowHandler = (OnboardingContext, @escaping (OnboardingResult) -> Void) -> Void
-
The type of the reset method’s completionHandler on the OnboardingStep protocol.
Declaration
Swift
public typealias ResetHandler = (OnboardingContext, @escaping () -> Void) -> Void
-
Instantiates the step.
Declaration
Swift
public init(onboardHandler: @escaping FlowHandler, restoreHandler: @escaping FlowHandler, resetHandler: @escaping ResetHandler = SimpleTaskStep.defaultResetHandler)
Parameters
onboardHandler
onboard logic
restoreHandler
restore logic
resetHandler
reset logic
-
Instantiates the step.
Declaration
Swift
public init(flowHandler: @escaping FlowHandler, resetHandler: @escaping ResetHandler = SimpleTaskStep.defaultResetHandler)
Parameters
flowHandler
onboard and restore logic
resetHandler
reset logic
-
Default reset logic which just calls the completionHandler
Declaration
Swift
public static func defaultResetHandler(context: OnboardingContext, completionHandler: () -> Void)
-
Declaration
Swift
public func onboard(context: OnboardingContext, completionHandler: @escaping (OnboardingResult) -> Void)
-
Declaration
Swift
public func restore(context: OnboardingContext, completionHandler: @escaping (OnboardingResult) -> Void)
-
Declaration
Swift
public func reset(context: OnboardingContext, completionHandler: @escaping () -> Void)