TaskHandler

public class TaskHandler<Model>

TaskHandler is used for subscription on task progress and completion callbacks. For more information see AvatarManager and ItemManager.

  • TaskProgress is used to provide the task progress

    Declaration

    Swift

    open class TaskProgress
  • Sets a closure to be called periodically during the lifecycle.

    Declaration

    Swift

    @discardableResult
    public func progress(handler: @escaping ProgressHandler) -> Self

    Parameters

    handler

    Closure to be executed periodically.

    Return Value

    The task handler.

  • Adds a handler to be called once the task has finished.

    Declaration

    Swift

    @discardableResult
    public func completion(handler: @escaping CompletionHandler<Model>) -> Self

    Parameters

    handler

    Closure to be executed once the model downloading has finished.

    Return Value

    The task handler.