Instance Method

cancel()

Cancel progress tracking.

Declaration

func cancel()

Discussion

This method invokes the block set for cancellationHandler, if there is one, and ensures that any subsequent reads of the isCancelled property return true.

If the receiver has any children, those children will also be cancelled.

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.

var cancellationHandler: (() -> Void)?

The block to invoke when progress is cancelled.

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.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software