Contents

PHAssetResourceProgressHandler

The signature for a block that Photos calls while downloading asset resource data from iCloud. Used by the Progresshandler property.

Declaration

typealias PHAssetResourceProgressHandler = (Double) -> Void

Discussion

If you request an asset resource whose data is not on the local device, and you have enabled downloading with the isNetworkAccessAllowed property, Photos calls your block periodically to report progress.

The block takes a single parameter:

progress

A floating-point value indicating the progress of the download. A value of 0.0 indicates that the download has just started, and a value of 1.0 indicates the download is complete.

See Also

Fetching Resource Data from iCloud