RSDCancelActionController

public protocol RSDCancelActionController : RSDStepController, RSDAlertPresenter

RSDCancelActionController is a shared protocol that can be used to present a consistent response to a cancel action (button tap) where the implementation of the step view controller is not shared.

  • Should the step view controller confirm the cancel action? By default, this will return false if this is the first step in the task. Otherwise, this method will return true.

    Declaration

    Swift

    func shouldConfirmCancel() -> Bool

    Return Value

    Whether or not to confirm the cancel action.

  • Finish canceling the task. This is called once the cancel is confirmed by the user.

    Declaration

    Swift

    func cancelTask(shouldSave: Bool)

    Parameters

    shouldSave

    Should the task progress be saved?

  • confirmCancel() Extension method

    This method is called when the user taps the cancel button. It confirms that the task should be canceled (unless this is the first step in the task). If the user confirms exit, then cancelTask is called.

    Declaration

    Swift

    public func confirmCancel()