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
RSDStepViewControllerVendorprotocol or theRSDThemedUIStepprotocol where theviewThemeis non-nil.Declaration
Swift
@objc optional func taskViewController(_ taskViewController: UIViewController, viewControllerForStep stepModel: RSDStepViewModel) -> UIViewController?Parameters
taskViewControllerThe calling
(UIViewController & RSDTaskController)instance.stepModelThe step and parent path component for this step.
Return Value
A custom view controller, or
nilto request the default step controller for this step. -
Asks the delegate whether or not the task should show a view controller for the
RSDTaskInfoStepwhile the initial task is being fetched.If defined, then: * If this function returns
truethen a view controller specific to theRSDTaskInfoStepwill be displayed. * If this function returnsfalsethenshowLoadingView()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) -> BoolParameters
taskViewControllerThe calling
(UIViewController & RSDTaskController)instance.stepThe step for which a view controller is requested. This will be an object that conforms to the
RSDTaskInfoStepprotocol.Return Value
A
Boolvalue indicating whether or not the task controller should show the task info step.
View on GitHub
RSDOptionalTaskViewControllerDelegate Protocol Reference