Type Alias


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


typealias PHAssetResourceProgressHandler = (Double) -> Void


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:


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

var isNetworkAccessAllowed: Bool

A Boolean value that specifies whether Photos can download the requested asset resource data from iCloud.

var progressHandler: PHAssetResourceProgressHandler?

A block that Photos calls periodically while downloading the asset resource data.