RSDTaskInfoStep
public protocol RSDTaskInfoStep : RSDStep
RSDTaskInfoStep
is a reference interface for information about the task. This includes information that can
be displayed in a table or collection view before starting the task as well as information that is displayed
while the task is being fetched in the case where the task is not fetched using an embedded resource or via
a hardcoded task.
-
A short string that uniquely identifies the task.
Declaration
Swift
var identifier: String
-
The primary text to display for the task in a localized string.
Declaration
Swift
var title: String?
-
The subtitle text to display for the task in a localized string.
Declaration
Swift
var subtitle: String?
-
Additional detail text to display for the task.
Declaration
Swift
var detail: String?
-
Copyright information for the task.
Declaration
Swift
var copyright: String?
-
The estimated number of minutes that the task will take. If
0
, then this is ignored.Declaration
Swift
var estimatedMinutes: Int
-
The estimated time to fetch the task. This can be used by the UI to determine whether or not to display a loading state while fetching the task. If
0
then the task is assumed to be cached on the device.Declaration
Swift
var estimatedFetchTime: TimeInterval
-
Fetch the task for this task info. Use the given factory to transform the task.
Declaration
Swift
func fetchTask(with factory: RSDFactory, callback: @escaping RSDTaskFetchCompletionHandler)
Parameters
factory
The factory to use for creating the task and steps.
callback
The callback with the task or an error if the task failed, run on the main thread.
-
An icon image that can be used for displaying the task.
Declaration
Swift
func fetchIcon(for size: CGSize, callback: @escaping ((UIImage?) -> Void))
Parameters
size
The size of the image to return.
callback
The callback with the image, run on the main thread.