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
RSDStepViewControllerVendor
protocol or theRSDThemedUIStep
protocol where theviewTheme
is non-nil.Declaration
Swift
func taskViewController(_ taskViewController: UIViewController, viewControllerFor step: Any) -> UIViewController?
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
RSDStep
protocol.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 theRSDTaskInfoStep
will be displayed. * If this function returnsfalse
thenshowLoadingView()
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) -> 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. -
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) -> Bool
Parameters
taskViewController
The task view controller.
Return Value
true
if 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
taskViewController
The task view controller.