Instance Property

cancellationHandler

The block to invoke when progress is cancelled.

Declaration

var cancellationHandler: (() -> Void)? { get set }

Discussion

If the receiver is a child of another progress object, the cancellationHandler block will be invoked when the parent is cancelled.

Special Considerations

You are responsible for cancelling any work associated with the progress object.

The cancellation handler may be invoked on any queue. If you must do work on a specific queue, you should dispatch to that queue from within the cancellation handler block.

See Also

Controlling Progress

var isCancellable: Bool

Indicates whether the receiver is tracking work that can be cancelled.

var isCancelled: Bool

Indicates whether the receiver is tracking work that has been cancelled.

func cancel()

Cancel progress tracking.

var isPausable: Bool

Indicates whether the receiver is tracking work that can be paused.

var isPaused: Bool

Indicates whether the receiver is tracking work that has been paused.

func pause()

Pause progress tracking.

var pausingHandler: (() -> Void)?

The block to invoke when progress is paused.

func resume()

Resume progress tracking.

var resumingHandler: (() -> Void)?

The block to invoke when progress is resumed.