Instance Property

progressHandler

A block Photos calls periodically while downloading the asset.

Declaration

@property(nonatomic, copy, nonnull) void (^progressHandler)(double progress, BOOL *stop);

Discussion

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

The block takes the following parameters:

progress

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

stop

A pointer to a Boolean value. Set *stop to YES inside the block to cancel the download.

See Also

Fetching Asset Data from iCloud

networkAccessAllowed

A Boolean value that specifies whether Photos can download the requested asset from iCloud if needed.