Type Alias

VNRequestProgressHandler

A block that is executed at intervals during the processing of a Vision request.

Declaration

typealias VNRequestProgressHandler = (VNRequest, Double, Error?) -> Void

Parameters

request

The completed Vision request. The results of the request, if no error occurred, reside in the results array of the request.

fractionCompleted

The fraction of the request that is completed, reported between 0.0 and 1.0. If the indeterminate property is set, this value is undefined.

error

The error that caused the request to fail, or nil if the request completed successfully.

Discussion

Vision may populate the results array in the request with partial data, before all results are ready.

See Also

Request Progress Tracking

protocol VNRequestProgressProviding

A protocol for providing progress information on long-running tasks in Vision.