RSDOptionalTaskViewControllerDelegate

@objc
public protocol RSDOptionalTaskViewControllerDelegate : AnyObject, NSObjectProtocol

RSDOptionalTaskViewControllerDelegate is a delegate protocol defined as @objc to allow the methods to be optionally implemented. As such, these methods cannot take Swift protocols as their paramenters.

  • Asks the delegate for a custom view controller for the specified step.

    If this method is implemented, the task view controller calls it to obtain a step view controller for the step.

    In most circumstances, the task view controller can determine which view controller to instantiate for a step. However, if you want to provide a specific view controller instance, you can call this method to do so.

    The delegate should provide a step view controller implementation for any custom step that does not implement either the RSDStepViewControllerVendor protocol or the RSDThemedUIStep protocol where the viewTheme is non-nil.

    Declaration

    Swift

    @objc
    optional func taskViewController(_ taskViewController: UIViewController, viewControllerForStep stepModel: RSDStepViewModel) -> UIViewController?

    Parameters

    taskViewController

    The calling (UIViewController & RSDTaskController) instance.

    stepModel

    The step and parent path component for this step.

    Return Value

    A custom view controller, or nil to request the default step controller for this step.

  • Asks the delegate whether or not the task should show a view controller for the RSDTaskInfoStep while the initial task is being fetched.

    If defined, then: * If this function returns true then a view controller specific to the RSDTaskInfoStep will be displayed. * If this function returns false then showLoadingView() will be called and the task will automatically forward to the first step once the task is fetched.

    If not defined, then: * showLoadingView() will be called and the task will automatically forward to the first step once the task is fetched.

    Declaration

    Swift

    @objc
    optional func taskViewController(_ taskViewController: UIViewController, shouldShowTaskInfoFor step: Any) -> Bool

    Parameters

    taskViewController

    The calling (UIViewController & RSDTaskController) instance.

    step

    The step for which a view controller is requested. This will be an object that conforms to the RSDTaskInfoStep protocol.

    Return Value

    A Bool value indicating whether or not the task controller should show the task info step.