RSDOptionalTaskViewControllerDelegate
public protocol RSDOptionalTaskViewControllerDelegate : class, 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
func taskViewController(_ taskViewController: UIViewController, viewControllerFor step: Any) -> UIViewController?Parameters
taskViewControllerThe calling
(UIViewController & RSDTaskController)instance.stepThe step for which a view controller is requested. This will be an object that conforms to the
RSDStepprotocol.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: * If and only if the task is a subtask where
estimatedFetchTime == 0, thenshowLoadingView()will be called and the task will automatically forward to the first step once the task is fetched.Declaration
Swift
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. -
Asks the delegate whether or not the task progress can be saved and the task dismissed.
Declaration
Swift
func taskViewController(_ taskViewController: UIViewController, canSaveTaskProgress for: RSDTaskPath) -> BoolParameters
taskViewControllerThe task view controller.
Return Value
trueif the task progress can be saved. -
Save the task progress for the given task controller.
Declaration
Swift
func taskViewController(_ taskViewController: UIViewController, saveTaskProgress for: RSDTaskPath)Parameters
taskViewControllerThe task view controller.
View on GitHub
RSDOptionalTaskViewControllerDelegate Protocol Reference