TaskHandler

public class TaskHandler<Model>

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

  • 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

    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

    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.